Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: nkhambal

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    806

    Re: Controlling Source Port

    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)...
  2. Replies
    7
    Views
    1,032

    Re: Custom Protocol Theory

    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...
  3. Replies
    4
    Views
    5,030

    Re: To connect a NAT behind client

    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...
  4. Replies
    1
    Views
    4,285

    Re: Multicast using WinSock

    ever heard of google? There is tons of information out there on this topic

    http://www.google.com/search?hl=en&q=Multicast+Programming
  5. Replies
    7
    Views
    758

    Re: connect() problem

    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...
  6. Replies
    3
    Views
    523

    Re: Problem with datagram socket

    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...
  7. Thread: Ip address

    by nkhambal
    Replies
    1
    Views
    428

    Re: Ip address

    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...
  8. Replies
    3
    Views
    706

    Re: How to calculate time out?

    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....
  9. Replies
    2
    Views
    556

    Re: TCP/IP confusion

    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
    ...
  10. Re: Classifying Incoming Packets in TCP or UDP

    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...
  11. Replies
    12
    Views
    1,453

    Re: multi sockets?

    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.
  12. Replies
    1
    Views
    1,131

    Re: TCP packets Assembling

    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...
  13. Replies
    12
    Views
    1,453

    Re: multi sockets?

    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...
  14. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    Anyone knows why select() does not block for 5 secs as specified.?
  15. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    Anyone knows why select() does not block for 5 secs as specified.?

    Nilesh
  16. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    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...
  17. Replies
    3
    Views
    1,395

    Re: HTTP and TCP packet assembling...

    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...
  18. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    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()...
  19. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    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...
  20. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    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...
  21. Replies
    14
    Views
    2,901

    Re: timeout for recvfrom()

    yes, till I get the required response from the server.I return from the loop after that.
  22. Replies
    14
    Views
    2,901

    timeout for recvfrom()

    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...
  23. Replies
    5
    Views
    1,561

    Re: General TCP question.

    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...
  24. Replies
    4
    Views
    7,131

    Re: WSAECONNRESET error

    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...
  25. Replies
    4
    Views
    7,131

    Re: WSAECONNRESET error

    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...
Results 1 to 25 of 138
Page 1 of 6 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center