[COLOR=black][SIZE=2]public [/SIZE][SIZE=2]static [/SIZE][SIZE=2]readonly [/SIZE][SIZE=2]string[/SIZE][SIZE=2] Address = [/SIZE][SIZE=2]"192.168.1.65"[/SIZE][SIZE=2];[/SIZE][/COLOR]
Currently the client does not support IPv6, but my previous solution will get rid of the need for now. The sever was sending its own IP first of all for encryption, which doesnt matter but the second time was because the login servers for OSI are different from the playable servers, so it must send the actual game server IP to the client.**noobie;653691 said:you cannot convert IPv6 to IPv4.
I dont have runuo codes right now, so I cannot check the issue you are talking about.
but why server is sending its own ip to the client? the client is already well aware of that ip therefore it is connected to the server. are you sure about this?
anyway, since it is on the server side, it could be handled.
if you could paste the code you are talking about, I might help..
[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]
[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE]
[SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]
mordero;653712 said:Solution Part 2!
I forgot to apply the changes that noobie pointed out when testing part 1 of the solution. So, look at the solution and then do this:
In Listen.cs in the core
Look for the Listener method and change the corresponding line to look like this
Code:[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]
then in the Bind method, change the Socket s line to this
Code:[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE] [SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]
That SHOULD make it work for you on vista (I have Vista Ultimate, so test it out on others too please). However, this does not check to make sure you have IPv6 enabled or anything, so dont try running this in Windows XP cause i dont know what it would do.
World: Loading...done (80679 items, 79 mobiles) (2.76 seconds)
Reports: Stats: Loading...done
Reports: Staff: Loading...done
Address: 127.0.0.1:2595
Address: fe80::1c5e:abf5:7159:4c3d%7:2595
Address: fe80::200:5efe:69.14x.xx.xxx%10:2595
Address: 2002:4592:257e::4592:257e:2595
Address: 69.14x.xx.xxx:2595
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Valid credentials for 'test'
Login: ::ffff:127.0.0.1: Account 'test' at character list
public Listener( int port )
{
m_ThisPort = port;
m_Disposed = false;
m_Accepted = new Queue<Socket>();
m_AcceptedSyncRoot = ((ICollection)m_Accepted).SyncRoot;
m_OnAccept = new AsyncCallback( OnAccept );
m_Listener = Bind( IPAddress.IPv6Any, port );
private Socket Bind( IPAddress ip, int port )
{
IPEndPoint ipep = new IPEndPoint( ip, port );
Socket s = new Socket( AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp );
s.SetSocketOption(SocketOptionLevel.IPv6, (SocketOptionName)27, 0);
mordero;653712 said:Solution Part 2!
I forgot to apply the changes that noobie pointed out when testing part 1 of the solution. So, look at the solution and then do this:
In Listen.cs in the core
Look for the Listener method and change the corresponding line to look like this
Code:[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]
then in the Bind method, change the Socket s line to this
Code:[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE] [SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]
That SHOULD make it work for you on vista (I have Vista Ultimate, so test it out on others too please). However, this does not check to make sure you have IPv6 enabled or anything, so dont try running this in Windows XP cause i dont know what it would do.
Darrell;653843 said:what is the name of this file i cannot find it anywhere ?