File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -13,23 +13,18 @@ namespace com.tvd12.ezyfoxserver.client.socket
13
13
{
14
14
public abstract class EzySocketReader : EzySocketAdapter
15
15
{
16
- protected EzyQueue < EzyArray > dataQueue ;
17
16
protected EzySocketDataDecoder decoder ;
18
17
protected readonly int readBufferSize ;
18
+ protected readonly EzyQueue < EzyArray > dataQueue ;
19
19
protected readonly EzyCallback < EzyMessage > decodeBytesCallback ;
20
20
21
21
public EzySocketReader ( )
22
22
{
23
+ this . dataQueue = new EzySynchronizedQueue < EzyArray > ( ) ;
23
24
this . readBufferSize = EzySocketConstants . MAX_READ_BUFFER_SIZE ;
24
25
this . decodeBytesCallback = message => onMesssageReceived ( message ) ;
25
26
}
26
27
27
- protected override void run ( )
28
- {
29
- this . dataQueue = new EzySynchronizedQueue < EzyArray > ( ) ;
30
- base . run ( ) ;
31
- }
32
-
33
28
protected override void update ( )
34
29
{
35
30
byte [ ] readBytes = new byte [ readBufferSize ] ;
Original file line number Diff line number Diff line change @@ -12,22 +12,17 @@ namespace com.tvd12.ezyfoxserver.client.socket
12
12
{
13
13
public class EzyUdpSocketReader : EzySocketAdapter
14
14
{
15
- protected readonly int readBufferSize ;
16
- protected EzyQueue < EzyArray > dataQueue ;
17
15
protected EzySocketDataDecoder decoder ;
18
16
protected UdpClient datagramChannel ;
19
17
protected IPEndPoint serverEndPoint ;
18
+ protected readonly int readBufferSize ;
19
+ protected readonly EzyQueue < EzyArray > dataQueue ;
20
20
21
21
public EzyUdpSocketReader ( ) : base ( )
22
- {
23
- this . readBufferSize = EzySocketConstants . MAX_READ_BUFFER_SIZE ;
24
- }
25
-
26
- protected override void run ( )
27
22
{
28
23
this . dataQueue = new EzySynchronizedQueue < EzyArray > ( ) ;
29
24
this . serverEndPoint = new IPEndPoint ( IPAddress . Any , 0 ) ;
30
- base . run ( ) ;
25
+ this . readBufferSize = EzySocketConstants . MAX_READ_BUFFER_SIZE ;
31
26
}
32
27
33
28
protected override void update ( )
You can’t perform that action at this time.
0 commit comments