From: <ili...@at...> - 2007-12-10 23:17:49
|
>I'm kinda new to Winsock programming. I downloaded some >good tutorials that I can learn from, but I was wondering >if anyone could tell me if I can send data to a server >from a client using send() and how do I do it in Dev? Is >there something that i have to do to get it to work? Remember what Dev-cpp is only ID. 1. U need create socket by old_socket = socket(...) 2. bind(old_socket, ...). 3. new_socket = listen(old_socket, ....) 4. recv(new_socket, buf, buf_length) 5. do something with buf. 6. close both sockets; 7. another turns. I'm not exactly getting how this would work. Would anyone perhaps be able to show me example code for this? |