VS 2008 TcpClient Eating Up CPU?

Oct 2, 2009

I've been working on a program where clients will send short messages to a server.[URL]

On the server side, this code is running to check for incomming messages:

Private mClient As System.Net.Sockets.TcpClient
...
Do
bytesRead = mClient.GetStream.Read(readBuffer, 0, BYTES_TO_READ)

[Code].....

View 4 Replies


ADVERTISEMENT

.Net 2008 IDE Hanging - MSVB7.dll Eating 100% CPU When Editing Code?

Mar 26, 2010

Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes.I am having a problem with msvb7.dll eating 50%+ cpu on my dual core system. This usually lasts 10-30 seconds or so, during which time the IDE is non-responsive.

This occurs when I do pretty much anything in the text editor, and can be replicated by simply adding blank lines to a function, and then deleting them. Or pasting some code. Or... lotsa stuff.

SP1 installed I had DevExpress' refactor/coderush, components, and codeit.right installed, but have removed all 3 of them. (I had installed the latest version of Refactor Pro! (9.3.4), perhaps the day before)

I have tried a VS.NET Repair. There is a kb that referenced some cpu destroying with vb, but it was included in SP1

[Code]...

View 3 Replies

.net - Difference Between New TcpClient(MachineName, Port) And New TcpClient(new IPEndpoint?

Mar 31, 2011

I have a .Net program that has to run on a cluster of server 2008. To find out the right IP I resolve the dns by GetHostEntry(VarDefinedInfConfig).AddressList(0)

but when I am converting my old code (this code picks the wrong IP) dns.GetHostName().AddressList(0) => this returns a virtual IP and not the right one.So I changed my TcpListener to (dns is parameter from config)Dim listener As TcpListener = New TcpListener(New IPEndPoint(Net.Dns.GetHostEntry(dns).AddressList(0), 8001))
listener.Start()

[Code]...

View 3 Replies

VS 2008 Tcpclient Run Command

Apr 21, 2009

is there a way to send a command to start a prog on the tcpclient side.

View 3 Replies

VS 2008 Know When A TcpClient Disconnects - Event?

Aug 31, 2010

I need to know when a TcpClient disconnects so I can properly free up the socket and process anything in my program that needs to happen when a client disconnects.

View 3 Replies

VS 2008 Specify An IP Address For TcpClient To Use Through Lans

May 17, 2011

During development, we usually use localhost as the hostname, like the following

Dim serverListener As New TcpClient("localhost", 8585)

I want the user to be able to enter their IP address via a TextBox instead, like

Dim serverListener As New TcpClient(textbox1.text, 8585)

View 5 Replies

VS 2008 TCPClient Connection State?

Feb 5, 2012

Is there a way to time out the connection? And loop to retry until it can connect?

View 1 Replies

VS 2008 - Make A TCPClient And Be A TCPServer Too At A The Same Time?

Apr 23, 2009

Can anyone tell me how to make make a TCPClient and be a TCPServer too at a the same time

View 1 Replies

VS 2008 TCPClient/Server Reverse Connection?

Apr 21, 2009

I have herd that a new type (or old type) of connection when the server connects to the client. Is it really possible to do such a thing with mulit-Servers trying to connect to one client.How would I make one like that O.o.

View 5 Replies

VS 2008 What Are Basics To Creating A Tcpclient / Server

Sep 8, 2009

What are the basics to creating a tcpclient / server?

View 3 Replies

VS 2008 - Properly Closing TCPClient So Server Does Not Crash

Jan 27, 2011

I have a simple tcpclient/server messenger running. Everything works great, except for when a client exits the software. When someone exits, is crashes the server with various exceptions and the server has to be restarted, as well as the clients. What I am looking for is a way to properly "log out" a client BUT leave any other connected client on so that is no break in the chat. Then the person that logged out or a new person can join back in whenever they choose.

CLIENT
''CHAT SERVICE
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim serverStream As NetworkStream
Dim readData As String
Dim infiniteCounter As Integer
[Code] .....

View 1 Replies

[2008] Use The Tcplistener And Tcpclient Classes : Remove Whitespace?

Feb 2, 2009

I am trying to learn how to use the tcplistener and tcpclient classes. While I am attempting to compare something that is sent from the client to the server it seems that it adds a bunch of spaces, the reason I know that is if I write to the console what was sent it adds a bunch of spaces at the end. Is there anyway to get rid of it and just get the original text. I tried trim() but that didn't seem to work but I could have been using it improperly.

View 30 Replies

Large Image Eating Away At Memory

Jun 22, 2010

Ok so i have an jpg image of around 8.10mbs at around 13424 x 11344 pixels, i need to load the whole image in to a scrolling picturebox, is they anyway to do this without using so much memory for example like what google maps does n cuts the image down and some how stitches it all back to gether?

View 1 Replies

VS 2010 Webbrowser Program Eating Up Too Much Ram?

Jan 19, 2012

I have a simple code that visits web pages. It's done in VB2010 & it's just a simple form with a web browser control built in. After leaving it on for a few hours, it goes from using about 50mb of RAM to 700mb. All it's doing is visiting 1-web page per 2 minutes from a txt list of url's.

What can I do to flush/reset this un-needed RAM usage without re-starting the program itself?

View 9 Replies

Winform Group Box Is Eating Button

Jun 13, 2011

I have a WinForms group box that needs to be sized programmatically. Everything else is working well but I am having trouble with the below line of code because as the form is re-sized larger the group box grows over the buttons that are underneath. I am looking for a way in code so that the group box grows with the form, but no so large that it grows over the button underneath it.

[Code]...

View 1 Replies

VS 2008 Create A Client / Server Chatroom Using TCPClient In Visual Basic

Jan 6, 2010

However I have hit a massive brick wall with my program. My program that I'm trying (can't emphasis this word the importance of that word) to create a Client/Server chatroom using TCPClient in Visual Basic. So far I can get my client to speak to my server. However, i'm trying to get the returned data to display in a listbox which never happened, i then tried a label, which again never happened then a text box which I'm sure you can figure out how that went! I'm not great at networking programmers nor am I not bad I'm terrible but duty calls when it comes to projects.

The code I currently have was mostly taken from the net but when I have the program fully work and I understand how the software works I intend to heavily modify for it to suit the needs of what I need to achieve. where I can get my client to display the data from the server that I have already sent to the server (which displays successfully within the server).

[Code].....

View 2 Replies

IDE :: Why Visual Studio 2005 Keeps Eating Up Memory Even It Is In Editing Mode

Nov 23, 2009

I am using Visual Studio 2005 with Service Pack1 installed. I am working on VB.Net project. However I am constantly choked up even I am in editing mode, i.e., I am NOT in debugging mode. Here is what bothers me:

[Code]...

View 2 Replies

VS 2008 (TcpClient) User/User Connection Circular Reference?

Aug 22, 2010

I have multiple TcpClient connections to my program. The connections exist as instances of a UserConnection class, that fires events on logon attempt and when receiving messages. My program also holds a Users object, which is a list of a User class objects, holding saved data (username, password etc) for each user that is allowed to log in.

It seems convenient to put a reference object of the respective user, in the UserConnection class (when successful login is verified). Hence, when an event is raised by the connection, the connection object will hold the user reference. As any event handler logic will need to know which user is responsible for the event.

If I don't make a user reference in the UserConnection class, then I need to loop through the users (less than 20) each time, to find the correct user. Not a big deal maybe, but i'm looking to understand how it would be done by an experienced programmer.

When data needs to be sent to a user, I need to access a UserConnection object. Hence the User class also holds a reference to the UserConnection class.

View 3 Replies

[VB2005] Rotateflip Image Is Eating More Memory Than Non Rotated Image ?

Sep 8, 2009

I'm writing a program that print images in full page. I.E, I print image on A4 paper, landscape. When I print an image without rotating it (the image IS landscape), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 1.5 Mb. When I print an image WITH rotating it (the image IS PORTRAIT ), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 28 Mb. The images are about 2000x3000 pixels, and stored in JPEG files (about 2.5 Mb each). I suppose that the 28 Mb should be the "uncompressed" size of the picture, and 1.5Mb, the compressed size...

By the way, When I look at the task manager, my application memory usage grows by job size, which seems to be OK. It grows either 1,5 Mb if no rotation is occured, and 25-30Mb when rotation occured.

Since I can print hundreds of image at once, my print queue will grow abnormaly if I need to rotate all

View 8 Replies

Enabling SSL With TcpClient?

Mar 2, 2009

So how does one turn SSL on in System.Net.Sockets.TcpClient with VB.NET code?

Turning it on in System.Net.Mail.SmtpClient is easy, you set the .EnableSsl property. I cannot find a corresponding property in TcpClient. It's probably buried somewhere.

View 1 Replies

How To Specify An IP Address For TcpClient To Use

May 16, 2011

During development, we usually use localhost as the hostname, like the following

Dim serverListener As New TcpClient("localhost", 8585)

I want the user to be able to enter their IP address via a TextBox instead, like

Dim serverListener As New TcpClient(textbox1.text, 8585)

However, this is not working for me.

View 2 Replies

Tcplistener / Tcpclient Over LAN

Apr 22, 2012

I am creating an application that will be talking over the LAN (and eventually, WAN) which uses the Tcplistener and Tcpclient objects.Now, I have this working absolutely fine locally using the loopack address although when I change the IP of the listener to 0.0.0.0 (listening for all IPs) and the IP in the client application, to the IP of the server, it throws an exception when connecting. The client says something along the lines of the the server has rejected the incoming connection. So i disabled all firewalls temporarily but I still have the problem.I have ran netstat on the server which clearly shows that it is listening for an incoming connection on 0.0.0.0. [code]

View 5 Replies

.net - Working Of Tcpclient Sockets In .net?

Jun 2, 2011

I have an application in vb.net which will connect with an hardware device and test its functionality. The hardware device basically spits out data continuosly through Ethernet. That is it recieves some data via com ports and spits out the processed data via ethernet.So my application does both. Thats pretty much the entire app.My problem is i am using tcpclient sockets. Now when i connect a tcpclient to the device using

tcpclient.open(ip,port);

Immediately the device sends some data which comes and get stored in the clientsocket. Then i send a command to it ,only then i read the data from the clientsocket using

tcpclient.getstream().read()

at this time the entire data that is the one which flowed immediately when connected to the device and the one that i actually need after passing command is both acquired. This is undesirable. I need the data which i read only after sending the command. So i was wondering if there is any way to clear the tcpclient socket before we do a read. The manual doesnt show any such method.

View 1 Replies

Communications :: TcpClient/Listener ?

Jan 16, 2010

I'm having a hard time getting the fundamentals down about these TCP Socket classes.

When you use TcpClient, you can set the IP Address or domain name to connect to the server end of the socket. I see examples that use "localhost" as the first parameter for TcpClient. Is this just a broadcast over the network to find the server that has a TcpListener listening on the dictated port of the second parameter of the TcpClient declaration? With any IP address for TcpClient (I realize that's an option, though), how does "localhost" find the TcpListener server?

View 8 Replies

Create An Array Of Tcpclient 1 To 5?

Jun 7, 2012

I want to create an array of tcpclient 1 to 5. i know it can be done by arralist but how i will add array of socket in arraylist and send/receive data.

View 5 Replies

Make A Tcp Ip Connection Using Tcpclient

Aug 15, 2009

i know how to make a tcp ip connection using tcpclient and so on. But what i want to know, how to transfer file in a specific computer?

View 2 Replies

Pass A Class Using TCPClient?

Mar 6, 2009

I have been reading the following thread by perito which was resolved with a great deal of assistance from Athiest.[url]...

Using the sample code in this thread I have now created a Client and Server app which is successfully sending messages over a network between two machines.

Now that I am able to send simple text messages I would like to progress to my intended pratice of sending more complex information between the machines. I have already written a program which generates and stores data with a class which I use as a data type. I would like to be able to pass this class from one machine to another.

View 2 Replies

Send Dataset With TcpClient?

May 6, 2010

i've a simple question: is possible to send dataset through TcpClient

View 3 Replies

Sending A String Using TcpClient?

Sep 13, 2009

My tcp client has made a connection to the server script! Now that it has connected, how can it send a simple string? I do not know what any of the overloads for the .Client.Send method even mean, or how to use them. I already have a system set up on the server side to parse the string when it is received on the server side, but I have no idea how to send a simple string to it.

View 2 Replies

Specify An IP Address For TcpClient To Use Through Lans

May 17, 2011

During development, we usually use localhost as the hostname, like the following

Dim serverListener As New TcpClient("localhost", 8585)

I want the user to be able to enter their IP address via a TextBox instead, like

Dim serverListener As New TcpClient(textbox1.text, 8585)

However, this is not working for me and how can i verfiy that the user enter correct ip address .

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved