Question Can anybody guide me please ?

nsoni

Member
Joined
Jan 6, 2008
Messages
11
Programming Experience
1-3
Hello!!!

I need to call a function in my vb.net client application to know the return value. The function is residing at remote side and we have the URL for accessing the function.

I will really appriciate if anybody provide me the solutions.

Regards
nsoni
nesarsoni@hotmail.com
 
Hello,
So what it looks like you have to do is add networking to your application. The other side will need to have networking as well.
You would need to create a socket inside your code and connect to a listening port tha the application on the other side is listening to.
The two programs need a place where they would have to talk, so in this case the one that you have the URL for (which should indicate it already has networking). So you need to create a place in the program so that it connects to the URL(and possibly different port) so it can access the function.
Here is some simple socket code:
VB.NET:
Imports System.Net.Sockets
Imports System.Net

Dim ip As String = URL
Dim tcpClient As New System.Net.Sockets.TcpClient
tcpClient.Connect(ip, sendport)
Dim networkStream As NetworkStream = tcpClient.GetStream()
networkStream.Write(send, 0, send.Length)
networkStream.Close()
Hope this helps,
Aia
 
Last edited by a moderator:
Back
Top