How to send a FIN with my last packet???

This is a discussion on How to send a FIN with my last packet??? within the C++ Programming forums, part of the General Programming Boards category; Ok, so i'm working on this server program, and I want to tell my client that its the last data ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    20

    How to send a FIN with my last packet???

    Ok, so i'm working on this server program, and I want to tell my client that its the last data packet that i'm sending by passing the FIN flag WITH the data.

    DATA + FIN, PSH, ACK -> Client
    ACK -> Server
    FIN, ACK -> Server
    ACK -> Client


    Thats how I want it to close. But when I send my data packet its only PSH,ACK and the client just ack's waiting for more. Remeber, I want the FIN and the data to go at once. Is there a way to manually set this flag??? TIA.

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    20
    i've found that closing the socket automatically adds the FIN.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 04:25 AM
  2. Preparing packet to send
    By davide_82 in forum C Programming
    Replies: 3
    Last Post: 11-05-2005, 02:28 PM
  3. ........ed off at functions
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-29-2002, 10:37 PM
  4. wont write to variable
    By Klinerr1 in forum C++ Programming
    Replies: 3
    Last Post: 07-25-2002, 11:00 PM
  5. off the screen
    By Klinerr1 in forum C++ Programming
    Replies: 2
    Last Post: 07-23-2002, 09:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21