Closed GoogleCodeExporter closed 8 years ago
The message is available as msg.SenderConnection.RemoteHailMessage. You need to
check if it's not null. So youl could something like this:
if(msg.SenderConnection.RemoteHailMessage != null)
{
Console.WriteLine( msg.SenderConnection.RemoteHailMessage.ReadString() );
}
Original comment by elise...@gmail.com
on 9 Oct 2011 at 11:36
See above comment
Original comment by lidg...@gmail.com
on 2 Nov 2011 at 9:29
[deleted comment]
I'm sorry for replying on this old topic. But when I receive the hail message
on the server side, I'm getting this error: Index was outside the bounds of the
array on the class NetBitWriter.
Original comment by fr92...@gmail.com
on 16 Jan 2014 at 1:05
Check out the Chat sample; it uses the hail message mechanism. Basically you
need to do:
case NetIncomingMessageType.StatusChanged:
NetConnectionStatus status = (NetConnectionStatus)im.ReadByte();
string reason = im.ReadString();
if (status == NetConnectionStatus.Connected)
Console.WriteLine("Remote hail: " + im.SenderConnection.RemoteHailMessage.ReadString());
break;
Original comment by lidg...@gmail.com
on 16 Jan 2014 at 8:10
Original issue reported on code.google.com by
tets...@inbox.lv
on 5 Oct 2011 at 8:39