随时修改IP地址,否则DHCP之后得不到新的地址
This commit is contained in:
parent
77b5d924e8
commit
c36fe94922
|
@ -438,6 +438,7 @@ bool TcpSocket::Connect(IPAddress& ip, ushort port)
|
||||||
if(!Open()) return false;
|
if(!Open()) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Local.Address = Tip->IP;
|
||||||
Remote.Address = ip;
|
Remote.Address = ip;
|
||||||
Remote.Port = port;
|
Remote.Port = port;
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,7 @@ bool UdpSocket::Send(const ByteArray& bs)
|
||||||
{
|
{
|
||||||
//if(ip.IsAny()) ip = Remote.Address;
|
//if(ip.IsAny()) ip = Remote.Address;
|
||||||
//if(!port) port = Remote.Port;
|
//if(!port) port = Remote.Port;
|
||||||
|
Local.Address = Tip->IP;
|
||||||
|
|
||||||
//byte buf[sizeof(ETH_HEADER) + sizeof(IP_HEADER) + sizeof(UDP_HEADER) + 1024];
|
//byte buf[sizeof(ETH_HEADER) + sizeof(IP_HEADER) + sizeof(UDP_HEADER) + 1024];
|
||||||
byte buf[1500];
|
byte buf[1500];
|
||||||
|
|
Loading…
Reference in New Issue