Search:
Type: Posts; User: nkhambal
Search:
Search took 0.06 seconds.
-
October 27th, 2006, 05:09 PM
In server programs, you usually call bind() to bind the socket to a predefined port before you call, listen() and accept(). You can do the same on client side as well before calling connect() (TCP)...
-
October 11th, 2006, 05:10 PM
You can design the protocol to use specific message format to achieve this.
Some of the latest protocol use TLV based message headers. TLV stands for Type, Length and Value. Each protocol packet...
-
October 3rd, 2006, 05:19 PM
There is a non programming solution. (A networking one). Set up a VPN (Virtual Private network) between Mahcine A and Server. I am presumming Server is a Windows Server. Google for VPN Configuration...
-
September 22nd, 2006, 03:19 PM
ever heard of google? There is tons of information out there on this topic
http://www.google.com/search?hl=en&q=Multicast+Programming
-
September 22nd, 2006, 03:11 PM
Are you sure that connect() is trying to connect to the right IP address.? Just for the heck of it, could you print the remote address (their_addr.sin_addr.s_addr ) and see if its the correct one? If...
-
I am not a Windows programmer but you can not use operations like ,FD_ACCEPT | FD_CONNECT, on a datagram sockets. These operations are specific to TCP sockets or STREAM sockets. May be you can try...
-
gethostbyname has nothing to with the proxy settings. Its related to the DNS server information configured on your host. Name to IP resolution is the function of DNS server. Check if the DNS server...
-
April 28th, 2006, 10:10 PM
Yes, it does work for UDP and recvfrom(). I know this because I recently used it one of my application. When the timout occures recvfrom() return with error number (variable "errno") EWOULDBLOCK....
-
April 13th, 2006, 01:15 AM
This is not a TCP header. This is the application level header beyond TCP/UDP layer. Application follows this format of Type/Length/Value. You can get this info like this
create a data structure
...
-
April 13th, 2006, 12:53 AM
You can look into the IP packet header for the protocol field. Protocol value of 6 means its a TCP packet and 17 means UDP. Similarly, value of 1 in protocol means its an ICMP packet.
Check this...
-
April 7th, 2006, 02:01 PM
I have not worked with IRC. Could you pls post some design spec. Tell us how you intend to connect and what you intend to do after connect.
-
April 7th, 2006, 09:36 AM
Check the "more fragments" flag and "fragmentation offset" fields in IP packet header. These fields are used by TCP/IP statck to check if the received IP packet is the entire packet or a part of...
-
April 7th, 2006, 09:23 AM
no, what is he means is..you can move create socket and connect() functions inside the thread itself. This way each thread will have its own socket to work on. Main thread i.e. main() will simply...
-
April 7th, 2006, 01:48 AM
Anyone knows why select() does not block for 5 secs as specified.?
-
April 7th, 2006, 01:48 AM
Anyone knows why select() does not block for 5 secs as specified.?
Nilesh
-
April 6th, 2006, 05:52 PM
You need not call the function sock() recursively, infact its dangerous as you might see a stack overflow after certain time and your application may crash.
Just remove the recursive call to...
-
April 6th, 2006, 03:07 PM
you can run a continuous recv() loop till you get 0 returned from it, which means that all data is received from the server and connection is closed normally. Add/append the data received in each...
-
April 6th, 2006, 02:49 PM
Not necessarily. If I don't return on any of the 2 condition, client will keep sending requests infinitely because of for loop and will never exit.
Since I am not doing any pointer or malloc()...
-
April 6th, 2006, 02:27 PM
Yes, you are right (thoretically, barring the language errors). What I mean by return is, If you see my for loop, I first check the response for 5 secs. If I don't get any response or if I get...
-
April 6th, 2006, 01:48 PM
Great!!!...Reseting the FD_SET with FD_ZERO after every sendto() did the trick. But, still the timeout I am setting with structure "tout" is not taking effect. i.e. Its not holding recvfrom() for 5...
-
April 6th, 2006, 01:33 PM
yes, till I get the required response from the server.I return from the loop after that.
-
April 6th, 2006, 02:05 AM
Hi,
I have to write a UDP client to send a request to the server. Sometimes server does not respond in time. I need to timeout recvfrom() after certain time (say 5 secs) and send another request...
-
February 14th, 2006, 09:27 PM
Is your session still connected? I guess yes. Even though your network cable is removed, the existing TCP timeouts are still UP in "ESTABLISHED" state. Some applications that use TCP such as...
-
February 6th, 2006, 02:36 PM
TCP Resets are usually generated by a host, when you try to connect to a port which host is not listening on or you tried connecting to some other IP that the one port is bound to.
In your...
-
February 6th, 2006, 08:36 AM
Given your situation, it looks like your server application is not coded to recv().
Have you coded the server application as well. If yes, what are you doing after your accept() call returns ? Are...
|
Click Here to Expand Forum to Full Width
|