Thread: A way to detect on disaconnect

  1. #1
    Registered User
    Join Date
    Aug 2019
    Posts
    9

    A way to detect on disaconnect

    Hello,

    Is there a way to disconnect client ?

    before then i disaconnect the spam the console, i will remove the user then he disconnect..

    TCP Socket, Serer and Client.

    i'm writeing a C Code

    Thanks for helping me

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Don't you just close() the client's socket, and the client goes away.

    You don't receive any more messages, and the client starts getting errors when they send.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. detect circles
    By victoria11 in forum C Programming
    Replies: 0
    Last Post: 03-11-2011, 09:47 AM
  2. how to detect end of line
    By a_satari in forum C Programming
    Replies: 11
    Last Post: 03-10-2011, 11:07 AM
  3. detect \n
    By xniinja in forum C Programming
    Replies: 4
    Last Post: 09-06-2010, 06:46 PM
  4. Detect when a file is used
    By franse in forum C++ Programming
    Replies: 5
    Last Post: 11-25-2008, 12:55 PM
  5. Edge Detect
    By 250co in forum C Programming
    Replies: 0
    Last Post: 05-22-2006, 08:51 PM

Tags for this Thread