njsokalski
Well-known member
- Joined
- Mar 16, 2011
- Messages
- 102
- Programming Experience
- 5-10
I will probably sound like a bad developer here, but I am attempting to convert some code from the following page from C# to VB.NET:
http://msdn.microsoft.com/en-us/library/hh286407(v=VS.92).aspx
The code I am having trouble converting is from Step 4 of "Joining a Multicast Group" on the page, and here is the code with the comment lines removed:
private void Join()
{
_receiveBuffer = new byte[MAX_MESSAGE_SIZE];
_client = new UdpAnySourceMulticastClient(IPAddress.Parse(GROUP_ADDRESS), GROUP_PORT);
_client.BeginJoinGroup(
result =>
{
_client.EndJoinGroup(result);
_client.MulticastLoopback = true;
_joined = true;
Send("Joined the group");
Receive();
}, null);
}
Any help would be greatly appreciated. Thanks.
http://msdn.microsoft.com/en-us/library/hh286407(v=VS.92).aspx
The code I am having trouble converting is from Step 4 of "Joining a Multicast Group" on the page, and here is the code with the comment lines removed:
private void Join()
{
_receiveBuffer = new byte[MAX_MESSAGE_SIZE];
_client = new UdpAnySourceMulticastClient(IPAddress.Parse(GROUP_ADDRESS), GROUP_PORT);
_client.BeginJoinGroup(
result =>
{
_client.EndJoinGroup(result);
_client.MulticastLoopback = true;
_joined = true;
Send("Joined the group");
Receive();
}, null);
}
Any help would be greatly appreciated. Thanks.