Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Any way to force a TCP connection to reset

Any way to force a TCP connection to reset

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpsysadminhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    supercat9
    wrote on last edited by
    #1

    I am trying to write software to communicate with some wireless LAN modules. Periodically, the device using the LAN module will power it up. It will then open a TCP connection to a server at a fixed IP address and port. Unfortunately, the WLAN module seems to pick the same source port number most of the time when it powers up. Under Windows 2000, if the WLAN module picks a port number YYYY that was used in an earlier connection, the packet sequence will be:

    ; End of previous connection
    module.YYYY -> server.XXXX FIN+ACK
    server.XXXX -> module.YYYY FIN+ACK
    module.YYYY -> server.XXXX ACK
    server.XXXX -> module.YYYY ACK
    ; Attempted new connection (PC doesn't know module got its ack)
    module.YYYY -> server.XXXX SYN
    server.XXXX -> module.YYYY ACK ; Not SYN ack, but rather a repeat of the previous ACK
    module.YYYY -> server.XXXX RST+ACK ; Kill off old connection
    module.YYYY -> server.XXXX SYN
    server.XXXX -> module.YYYY SYN+ACK ; New connection is now happy

    Windows XP no longer sends the ACK after the SYN; the module will thus keep trying SYN packets until it times out. This causes many connections to fail. Is there any way using .net under XP to force the PC to reset a connection? Ideally, the WLAN module would simply pick different port numbers on each connection attempt, avoiding the problem altogether. Unfortunately, I have no control over the firmware for that thing.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups