Thread: socket

Results 1 to 4 of 4
  1. #1 socket 
    Blair'
    Guest
    How do I close a socket permanently ?

    Say I'm beeing flooded but since I have a client requirement they just use up bandwidth.

    How would I close their socket completely ? Or use a firewall to block them. I don't want to write to a file, I just want them banned till I restart my server.
    So obviously we would use RAM. Which my dedi has 8gigs of.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Sanity's Avatar
    Join Date
    Dec 2008
    Posts
    2,062
    Thanks given
    22
    Thanks received
    362
    Rep Power
    762
    When a player connects to your server, they will create a socket.

    Calling socketNameHere.close() will close that connection.

    You could make an if statement checking the ip of the connector and if they are that player, then close the connection.

    Not experienced in networking, but this is what I have noticed and observed merely from RSPS.
    Reply With Quote  
     

  3. #3  
    Blair'
    Guest
    Code:
    misc.println("ClientHandler: Rejected "+ connectingHost + ":" + s.getPort());
    s.close();
    only closes it so the person can automaticly open a new, continuously floooding
    Reply With Quote  
     

  4. #4  
    Community Veteran


    Join Date
    Jan 2008
    Posts
    2,659
    Thanks given
    494
    Thanks received
    627
    Rep Power
    980
    Create some sort of list for banned IPs.
    ~iKilem
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •