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 ?
this is t
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;
port = hto
Hi All
I am getting an error when using the below code
Receiver
Code:
use IO::Socket;
$sock = new IO::Socket::INET (LocalHost => 'goldengate',
LocalPort => 1200,
Proto => 'tcp',
Listen => 5,
Reuse => 1
);
die "Socket could not be created.
PHP Code:
Hello
HTML Code:
Hi,
I am new to the socket programming.
Hello,
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.
I am writing an network application.
and have some problem regarding thread race condition.
"cd" is a socket descriptor.
one of my thread retrieves socket descriptor
and send some data through the socket.
lets say map_sd returns 5.
however another thread might close the socket 5 and
reassign another.
Time for a new programming challenge!
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