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'm trying to add local sockets in my multi-threaded application in order to exchange data between threads. The only problem I got is that most of the information available on the net is related to internet oriented socket programming while I want to perform local connections.
it's been a while since I think about starting to programming in C and after that to learn programming in C# and I search a lot on google but couldn't find a good guide to start learning base programming in C .However I found that Eclipe integrates very good with Ubuntu and it's a good programming environment for starting to program in C but somebody can give please some links with guides or tell