I am searching cross-platform techniques to write client-server applications on Mac. I used BSD sockets, Cocoa APIs but I need to know which would be better at performance.
We are developing a network application based on C/S, in this application the server needs to transfer files to clients and sometimes receive files from clients. So in the server application, for every client it needs to create a control socket and many transfer sockets.
My question is how we can create and define a socket as role of control socket or transfer socket?
i have read about RAW sockets that they are UNIX domain sockets and don't generally go over the wire unlike TCP or UDP. They are used for interprocess communication. Also they are used in the implementation of new transport layer protocols and are also used in ICMP(for ping).
I'm really thinking about purchasing this book - Internetworking with TCP/IP, Vol. III: Client-Server Programming and Applications, Linux/POSIX sockets version by Douglas Comer - but I have a few concerns...
1. Its the third is a series and I haven't read the first two, will this make the book hard - impossible to understand?
I have a client server program using sockets, one android tablet is server and the other android is client. it works fine in the first example shown below where i am sending a simple message, but in the second example below i tried to use an if statement and it does not work.