• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: closing sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closing sockets


  • Subject: Re: closing sockets
  • From: Andrew Farmer <email@hidden>
  • Date: Mon, 20 Nov 2006 01:03:58 -0800

On 20 Nov 06, at 00:38, Yuri Lew wrote:
I play a lot of games and am writing an application to aid me in my gameplay. One of the features i want to incorporate into this application is to be able to 'kick' other players. I know that this is possible on pc's as i have seen programms that do it, however you have to be the 'host' in order to be able to kick people. The way im thinking of doing it is to close() or shutdown() the socket that person is connected to. I have tried calling both close() and shutdown() on the file descriptor however both functions return -1. I think that there might be a problem with the fact that I didnt create those sockets and am just getting them from a netstat -n.

That would, indeed, be the problem. You can't close sockets that you didn't create. You'll have to be a bit more clever about it...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >closing sockets (From: "Yuri Lew" <email@hidden>)

  • Prev by Date: Re: Re: is there a memory leak?
  • Next by Date: Re: CoreData undo and observing related objects
  • Previous by thread: closing sockets
  • Next by thread: More autorelease pool strangeness
  • Index(es):
    • Date
    • Thread