|
-
Feb 5th, 2009, 05:30 AM
#1
Thread Starter
New Member
Remote Desktop
hi
I got data transfer project via tcp/ip. but its give some error..anybody help me to clear that errors..
client.Send(buffer, wd, Sockets.SocketFlags.None)
Error:
Overload resolution failed because no accessible 'Send' can be called without a narrowing conversion:
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Send(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'.
wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
Error:
Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'.
wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
Error:
Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'.
this coding i download from this link
http://www.codeproject.com/KB/vb/UnoLibsNet_V2.aspx
how to clear this error or give ur thought to manage this error...
-
Feb 5th, 2009, 06:17 AM
#2
Please mark you thread resolved using the Thread Tools as shown
-
Feb 5th, 2009, 07:38 AM
#3
-
Feb 5th, 2009, 08:05 AM
#4
Re: Remote Desktop
Read the code, documentation or just use Intellisense to see what the types are for the parameters of those methods and make sure your arguments are the correct types. If a conversion or cast is required then perform it. If you're not quite sure exactly how then tell us, what types are the method parameters and what types are your arguments?
Last edited by jmcilhinney; Feb 5th, 2009 at 08:12 AM.
-
Feb 5th, 2009, 09:15 AM
#5
Thread Starter
New Member
Re: Remote Desktop
hi all
i'm not quite good in vb.net...just basic things only i know..this s first time i start to do client server connection using tcp/ip... i searched in google to got this coding.. if i run this coding its says those errors ... if u don't mind u download this coding and try it and then u answer that errors.. i hope u'll help me..
http://www.codeproject.com/KB/vb/UnoLibsNet_V2.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|