CS779/879

Assignment #3

Due Midnight, Wednesday March 28, 2012


Implement the following program:

NAME

EMTC  - Enhanced Multicast TCP Chat

SYNOPSIS

EMTC    <multicast-address>   <port-number>  < s | t | f > 

 

DESCRIPTION

        This is an Enhanced/Exteded implementation of assignment 1

The program creates:

ü  A UDP socket U:

 The socket joins the multicast group G defined by the two arguments:

                        <multicast-address>   <port-number>

e.g.,      224.0.0.1                         10123

 

ü  A server TCP socket T:

The socket is binded to <port-number> 

It accepts TCP clients at sockets C1, C2, ....

Any message received from any TCP client C1, C2, .... is sent as a multicast message out of  U.

Any multicast message (and not a unicast) received at U is sent to all currently connected clients C1, C2, ...

 

ü The program implements its function based on the following options:

s : use select

t : use threads

f : use fork & shared memory.

 

ü You may test the my implementation at:

http://www.cs.odu.edu/~cs779/spring12/assignments/a3/wahab/

 

To test EMTC you may use:

http://www.cs.odu.edu/~cs779/mcastChat/mcastChat.c

http://www.cs.odu.edu/~cs779/sock/

 

Example:

% EMTC        224.0.0.1   10123   f       (or  t or s)
% mcastChat  224.0.0.1   10123

% sock           127.0.0.1   10123