CS779/879

Assignment #5

Due Midnight, Wednesday April 20, 2011


Write the following programs.

NAME

TSCServer   TCP/SCTP Chat Server

TSCClient   – TCP/SCTP Chat Client

 

SYNOPSIS

TSCServer  <port> <time-limit>

TSCClient  <type>  <host>  <port> where <type> is one element of the set: { t4, t6, s4, s6, q4, q6}

 

 

DESCRIPTION

 

TSCServer

·       The program creates  two IPV6 sockets : a TCP socket and an SCTP socket and binds each to <port>.

·       It accepts connections from any number of  TCP or SCTP clients and any message recieved from any client is sent to all connected clients.

·       If any client does not send a message in a period of <time-limit> seconds, it is disconnected.

·       The program exit if there is no connected clients and no new connections in a period of <time-limit> seconds.

 

TSCClient

·       The program is as a typical chat client: accept user input, send it to the server and receive messages from the server and display it to the user.

·       The progarm behave according to the specified client type as :

 

t4 : TCP IPV4

t6 : TCP IPV6

s4 : SCTP STREAM IPV4

s6 : SCTP STREAM IPV6

q4 : SCTP SEQPACKET IPV4

q6 : SCTP SEQPACKET IPV6