Socket and Internet programming practices

G

Guest

Hi,
I'm wondering what the industry practices are for socket and internet
programming. Can you provide any links to good articles on network
application architecture? I have found many tutorials, but most don't get
into the detail I desire, and are very very simple TCPClient/TCPListener
implementations. I haven't found any great literature on how production-level
data transmisison applications are made.

For example, suppose I'm making an instant message, and file transfer
application, should this application be connection based TCP, or
connectionless UDP?

If a server portion of this application can support mutliple clients, should
these clients be on separate ports, or should all the listening be done on
one port?

What are the general data transmission techniques? I have been experimenting
with fixed-length byte arrays with first byte being type of data, second
through fifth bytes being length of data coming, then the data following.

How does one deal with the data exchange between classes in a
socket-transfer application? For instance, incoming data needs to be dealt
with, an event could be generated with the incoming data, but then the thread
that was receiving data from the socket would be the thread that fires the
event (and delegates attached to the event) blocking any more data from
coming into the socket. I have implemented a queue, with a dedicated event
thread to process the events in the queue, is this an acceptable practice?

Is a TCP socket connection full duplex, so a separate thread can be blocking
at receive() while a thread sends() bytes? How about UDP?

What methods,tips, and tricks are used to measure kbps transfer speeds?
Especially with fixed-length packets as described above?

Thanks for any input on this subject. I have a great deal of experience
programming, and when I take on a new hobby project, I run into a barrage of
questions like this, and can usually find great answers around the
net/newsgroups, but this topic seems sparse with user input.

Thanks in advance,
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top