473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How can TCP/IP client connect to Server TCP/IP socket?

Hi,

I have a Server TCPIP socket open at 192.168.1.100, port 80. When I use an
C++ Client application to connect it ---> It works fine!

However, when I use VB.net with:
=========================================
Dim tcpClient1 As New TcpClient
Dim ipAddress As IPAddress
ipAddress = Dns.Resolve("192.168.1.100").AddressList(0)

Try
tcpClient1.Connect(ipAddress, 80)
Catch ex As Exception
Console.WriteLine(e.ToString())
End Try
==========================================
I built without any errors, but when I execute it, it show errors!

Can any one show me how to do it right?

Many thanks,

--
Anh
Jul 21 '05 #1
1 2016
What exceptions are you seeing, exactly?

btw: Here's an oldie but still a goodie :)
http://msdn.microsoft.com/library/de...et08282001.asp

Robert Smith
Kirkland, WA
www.smithvoice.com

"Anh Truong" <An*******@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Hi,

I have a Server TCPIP socket open at 192.168.1.100, port 80. When I use an
C++ Client application to connect it ---> It works fine!

However, when I use VB.net with:
=========================================
Dim tcpClient1 As New TcpClient
Dim ipAddress As IPAddress
ipAddress = Dns.Resolve("192.168.1.100").AddressList(0)

Try
tcpClient1.Connect(ipAddress, 80)
Catch ex As Exception
Console.WriteLine(e.ToString())
End Try
==========================================
I built without any errors, but when I execute it, it show errors!

Can any one show me how to do it right?

Many thanks,

--
Anh

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do...
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
0
by: netgeni59 | last post by:
Hello fellow C# friends, I am trying to write a C# TCP client that was formerly written in Java. The server must still remain in Java. I cannot get text data from the C# client to be received...
2
by: CHRISM | last post by:
Hiya, Been trying to figure this one out. I've written a very simple server in VB.NET that listens for client connections, then spits out a bunch of text and then closes the connection. Much...
4
by: rs | last post by:
how I the client tell the server that the socket is closed? or this there an even that informs the server that the clients socket is close? Oh, I am using vb.net 2003 Thanks
11
by: Tor Erik | last post by:
Hi, The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage...
4
by: rajbala | last post by:
Hi all, I am a newbie to JSP. I had a program in client and server by using java. But i want the same program in JSP. Please help me. server: // TCP server which waits...
0
by: ryaneoghan | last post by:
hi, I was just wondering if anyone could help, i am trying to create a client and server socket connection in perl, i want to ask for name and then do a check on the name and ask for a secret word...
2
by: kashifjawed | last post by:
I'm developing a c# asynchronous socket application for tranfering file or large data from client to server and server to client as well in chunks. Application sometimes transfer file from client...
1
by: Jack Wu | last post by:
hello everyone! i am a freshman of computer science and not a native English speaker, so if i made some stupid grammatic or spelling mistake please tell me. i'll correct it as soon as possible and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.