Why the server got so many connection requests from an invalid socket?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ngontro86
    New Member
    • Jun 2010
    • 3

    Why the server got so many connection requests from an invalid socket?

    Hi,


    I am having a big issue when I develop my server. Basically, server is listening on a fixed port from clients. I did some checking to discard those are not from my client. However, I got so many weird connection requests from an invalid socket. This will make our server couldn't do anything useful after running a while! All coming from one IP and they constantly requests to our server... this is for sure not sort of DoS attack.
    To see why it's from invalid socket, I check the return value of accept() as:
    Code:
    if( accept(ListenningSock,...) == INVALID_SOCKET) {
    
    }
    For more info, I am using winsock2.h Anyone can point me any reasons why?
  • ngontro86
    New Member
    • Jun 2010
    • 3

    #2
    Originally posted by ngontro86
    Hi,


    I am having a big issue when I develop my server. Basically, server is listening on a fixed port from clients. I did some checking to discard those are not from my client. However, I got so many weird connection requests from an invalid socket. This will make our server couldn't do anything useful after running a while! All coming from one IP and they constantly requests to our server... this is for sure not sort of DoS attack.
    To see why it's from invalid socket, I check the return value of accept() as:
    Code:
    if( accept(ListenningSock,...) == INVALID_SOCKET) {
    
    }
    For more info, I am using winsock2.h Anyone can point me any reasons why?
    Anybody got any clues?

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      What does GetLastError return?

      Comment

      • ngontro86
        New Member
        • Jun 2010
        • 3

        #4
        It returns 0, I guess it resets the error somewhere
        I did another version in java, there seems no such weird requests but it still happens in wx + winsock2

        Comment

        Working...