Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Asynchronous Sockets?  (Read 5024 times)

0 Members and 2 Guests are viewing this topic.

iop

  • Newbie
  • *
  • Posts: 4
    • View Profile
Asynchronous Sockets?
« on: March 10, 2010, 01:47:49 pm »
Hey

is there a possibility to use asynchronous sockets in sfml?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Asynchronous Sockets?
« Reply #1 on: March 10, 2010, 05:42:07 pm »
You can switch a socket to non-blocking mode.
Laurent Gomila - SFML developer

iop

  • Newbie
  • *
  • Posts: 4
    • View Profile
Asynchronous Sockets?
« Reply #2 on: March 11, 2010, 03:49:10 pm »
Thats not really what I search, but its ok!

Thanks :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Asynchronous Sockets?
« Reply #3 on: March 11, 2010, 04:00:04 pm »
There's no built-in mechanism for asynchonous sockets, you'll have to build it yourself with threads if you really need it.
Laurent Gomila - SFML developer

iop

  • Newbie
  • *
  • Posts: 4
    • View Profile
Asynchronous Sockets?
« Reply #4 on: March 11, 2010, 05:56:54 pm »
For implementing asynchronous sockets I would need a win32 interface what makes things more complicated... or is there a possibility to catch the window notifications from the network card (fd_read, fd_write, ...) while using sfml rendering windows?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Asynchronous Sockets?
« Reply #5 on: March 11, 2010, 06:36:52 pm »
What about Boost.Asio?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

iop

  • Newbie
  • *
  • Posts: 4
    • View Profile
Asynchronous Sockets?
« Reply #6 on: March 12, 2010, 12:21:53 am »
You're right nexus, I totally forgot about boost.asio (I did never use it before...) I think, I'll give it a try :)