Skip to content

Commit 03522b1

Browse files
committed
unity sdk .net4.x支持 #1148
1 parent c67c1ba commit 03522b1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Assets/Plugins/kbengine_unity3d_plugins/NetworkInterfaceBase.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public abstract class NetworkInterfaceBase
3030
protected Socket _socket = null;
3131
protected PacketReceiverBase _packetReceiver = null;
3232
protected PacketSenderBase _packetSender = null;
33-
protected EncryptionFilter _filter = null;
33+
protected EncryptionFilter _filter = null;
3434

3535
public bool connected = false;
3636

@@ -40,8 +40,8 @@ public class ConnectState
4040
public string connectIP = "";
4141
public int connectPort = 0;
4242
public ConnectCallback connectCB = null;
43-
public AsyncConnectMethod caller = null;
44-
public object userData = null;
43+
public AsyncConnectMethod caller = null;
44+
public object userData = null;
4545
public Socket socket = null;
4646
public NetworkInterfaceBase networkInterface = null;
4747
public string error = "";
@@ -88,18 +88,18 @@ public virtual void reset()
8888
}
8989

9090

91-
public virtual void close()
92-
{
93-
if(_socket != null)
91+
public virtual void close()
92+
{
93+
if(_socket != null)
9494
{
9595
_socket.Close(0);
9696
_socket = null;
9797
Event.fireAll(EventOutTypes.onDisconnected);
98-
}
98+
}
9999

100-
_socket = null;
101-
connected = false;
102-
}
100+
_socket = null;
101+
connected = false;
102+
}
103103

104104
protected abstract PacketReceiverBase createPacketReceiver();
105105
protected abstract PacketSenderBase createPacketSender();
@@ -209,16 +209,16 @@ public void connectTo(string ip, int port, ConnectCallback callback, object user
209209

210210
_socket = createSocket();
211211

212-
AsyncConnectMethod asyncConnectMethod = new AsyncConnectMethod(this._asyncConnect);
212+
AsyncConnectMethod asyncConnectMethod = new AsyncConnectMethod(this._asyncConnect);
213213

214-
ConnectState state = new ConnectState();
214+
ConnectState state = new ConnectState();
215215
state.connectIP = ip;
216216
state.connectPort = port;
217217
state.connectCB = callback;
218218
state.userData = userData;
219219
state.socket = _socket;
220220
state.networkInterface = this;
221-
state.caller = asyncConnectMethod;
221+
state.caller = asyncConnectMethod;
222222

223223
Dbg.DEBUG_MSG("connect to " + ip + ":" + port + " ...");
224224
connected = false;

0 commit comments

Comments
 (0)