-
port opening
HI everybody,
I wrote a simple client program, which is connected t the server program (running in different machine)
servaddr.sin_port = htons(80);
inet_pton(AF_INET, serv_ip, &servaddr.sin_addr);
with the above mentioned commands , the client can able to connect to a particular port...
But ,
I want to open a particular port in client side , and with this port only i need to connect with server port.
For this , what i have to do Pls help me........
Thanks in Advance.
-
I think you should to call bind to specify a local address before you call connect.
Otherwise, the kernal proto-stack will select a random port for your local address.