2of1
half a nibble of another

Home
Projects
About
Jun

21

O_NONBLOCKing socket()s

Filed Under (C, Coding, Networking) by 2of1 on 21-06-2010

When connect()ing to a server, there is no direct way to define a timeout for that connection attempt – meaning that you could be waiting for a LONG time.

Read the rest of this entry »

No Comments
Read More
Jun

21

bind()s and SO_REUSEADDR

Filed Under (C, Coding, Networking) by 2of1 on 21-06-2010

The linux kernel will automatically lock up a port on bind() – even if the process is killed.
Well actually the kernel will close the socket when the process ends, however it stays in the 2MSL (2 x Max. Segment Lifetime) state for a few (2) minutes.
Read the rest of this entry »

No Comments
Read More
Jun

08

accept()ing multiple tcp connections

Filed Under (C, Coding, Networking) by 2of1 on 08-06-2010

The best way I’ve found of handling multiple tcp connections on the same socket is to use a poll file device with the listen()ing socket itself as the first pfd.

Read the rest of this entry »

No Comments
Read More
Newer Entries »
  • Recent Posts

    • Sony Bravia Escapades #1: The teardown
    • Cracking WiFi: Israeli Provider fail
    • Razer Naga open source Linux driver
    • ARM long branch
    • Mini-Namco #3: (Almost) Finished
  • Archives

    • April 2012
    • January 2012
    • September 2011
    • August 2011
    • July 2011
    • May 2011
    • March 2011
    • February 2011
    • January 2011
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
  • GitHub

    • code
    • d2d1headers
    • locateme
    • findjerusalem
    • seg7
    • userspace-krb
    • libgmail
    • preloader
    • linhook
    • robinhood
    • andhook
    • razer-drivers
  • qrcode

  • Site Search

  • Categories

    • Apps (7)
      • Preloader (1)
      • Symbian S60 (1)
      • VLC (4)
      • Wordpress (1)
    • Coding (29)
      • Assembly (1)
        • ARM (1)
      • C (13)
      • Compilers (5)
      • Direct2D API (4)
      • Linux kernel (3)
        • Drivers (1)
      • Networking (4)
      • Python (1)
      • Sqlite (1)
      • Version control (5)
        • Git (5)
    • Hacking (6)
      • Code injection (1)
      • Reverse engineering (4)
    • Hardware (5)
      • Arduino (1)
      • PCBs (3)
    • Linux (22)
      • Bash (1)
      • Tips & tricks (13)
      • Virtualization (1)
      • VNC (2)
      • Xmonad (1)
    • Open source (33)
    • Other stuffs (4)
    • Social (3)
      • DC9723 (2)
  • OctoFinderProgramming Blogs - Blog Catalog Blog Directory

    Locations of visitors to this page

© 2of1.