-
Notifications
You must be signed in to change notification settings - Fork 3
/
TCPConnection.cs
executable file
·52 lines (46 loc) · 1.46 KB
/
TCPConnection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using ComponentAce.Compression.Libs.zlib;
namespace AOCapture
{
class TCPConnection
{
public int localPort;
public int remotePort;
public SortedList<uint /*seqNo*/, TCPPacket> outOfOrderPackets;
public Object dataParser;
public ZInputStream decompressor;
private UInt32 _receivingSequenceNumber;
public UInt32 receivingSequenceNumber
{
get { return _receivingSequenceNumber; }
set
{
receivingStreamOpen = true;
_receivingSequenceNumber = value;
}
}
//TODO: remove, right now each side of the connection gets its own TCPConnection
private UInt32 _sendingSequenceNumber;
public UInt32 sendingSequenceNumber
{
get { return _sendingSequenceNumber; }
set
{
sendingStreamOpen = true;
_sendingSequenceNumber = value;
}
}
public bool receivingStreamOpen = false;
public bool sendingStreamOpen = false;
public TCPConnection(int localPort, int remotePort)
{
this.localPort = localPort;
this.remotePort = remotePort;
this.outOfOrderPackets = new SortedList<uint, TCPPacket>();
}
}
}