I am new to socket programming and linux I could find some code about socket programming I want to use this code to connect to a printer , this code is using gethostbyname function which is responsible for getting hostent I think everything is fine except that I have not the host name I just have an IP address (of printer), So what function should I use to connect to the printer by IP ?
hi, i am a newbie for ubuntu. I would like to know that how to connect 2 ubuntu computers by using TCP/IP socket programming. If anyone knows, pls share me some knowledge. I'm really appreciate your help.
I'm new in socket programming under Linux (UNIX) sockets.
I found the following code in the Internet, for a tcp-server that spawns a thread for each connection.
However it doesn't work.
the accept() function returns instantly, and doesn't wait for connection.
What am I doing wrong ?
this is the code
int main(int argv, char *args)
struct sockaddr_in addr;
int sd, port;
I am a beginner in socket programming in c++ and c#. i have seen code on TCP/IP server and client sockets on Linux and windows both. Can anybody tell me about the buffer used between client and server for communication. i mean where this buffer actually lies is it at the kernel level. and how data on this buffer is written and read at memory level using send and recv.