Send An Object Over A Network Stream

Oct 18, 2010

So i'm still goofing around with this chat app thing. Current when a user sends a message it sends to all clients connected. The server stores all clients and their IPs in a hash table, so what i want to do is each time a client joins, the server will broadcast the updated hashtable to each client. I know i can make a mess and get the server to broadcast each row of the hash table as a string but i think this way would be cleaner, either that or send the client object instead of the whole hash table.

[Code]...

View 3 Replies


ADVERTISEMENT

Network Stream - Send / Receive Text

Sep 17, 2010

I've solved part of the problem, but something I've just realised is the information just isn't getting through and EVERY example I find uses a Console type application and what about us people who don't wanna develop a Console application? I don't but nooooo they don't seem to understand that at MS and put one example which uses exactly that.

[Code]...

View 4 Replies

Send A XML Serialized Class Over A Network Stream?

Oct 13, 2009

I'm trying to send a XML serialized class over a network stream

the send is working

Dim IP As Net.IPAddress = System.Net.IPAddress.Parse(IPAddress)
Dim IPE As New Net.IPEndPoint(IP, 10003)
Dim TCPClient As New Net.Sockets.TcpClient

[Code]....

I always get an error {"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."} The XMLFile has the xml document in it most of the time and I can go on and everything works but 1 out of every 5 times it doesn't work at all and the XMLFile contains nothing ..

View 6 Replies

Send Serialized Object Over TCP Stream?

Jun 7, 2010

How can I send and recieve serialized objects over a TCP connection with size and data type values in the header (within array(0) and array(1) values)?

I know how to serialize and send the object using

BinaryFormatter.Serialize

But on the receiving end I dont know the size of the obejct sent therefore I dont know when to stop reading the data stream. I also dont know how to take the recieved data and put it into an array of bytes().

View 2 Replies

VS 2008 Network App - Send Message Or Network Package To Some Of The Clients In The Network

Aug 18, 2009

Here is my idea so far: I have a bunch of computers connected in a local network. One of them is a MySQL server, one will have a vb.NET program wich will act as a "second server" and the rest will be different clients. What I want to do is that the "second server" will send out some kind of message or network package to some of the clients in the network, and they will execute a code based on what message it is, or what kind of package it is. I'll give you a simple example:

[Code]...

View 6 Replies

XMLDocument And Network Stream?

Jul 17, 2010

I'm trying to send a XML serialized class over a network stream the send is working

Dim IP As Net.IPAddress = System.Net.IPAddress.Parse(IPAddress)
Dim IPE As New Net.IPEndPoint(IP, 10003)
Dim TCPClient As New Net.Sockets.TcpClient

[code].....

View 2 Replies

.net - Extra Byte In Network Stream?

Feb 15, 2011

I have an .net application with 2 processes, communicating using a network stream.The protocol consists of a set of commands, some with parameters, which are sent through the stream to the server. The server processes the command, and sends a response.

The protocol for one of the commands looks like this:

[code]...

Usually, this works fine. Very rarely (probably once every few millions of calls), The reading side gets the wrong values. I added code to trace the values sent and received. This shows that occasionally, the reading side gets two extra bytes, with the value 0, which was not sent by the writing side. These extra bytes appear in different places, e.g. in one case they were between i1 and i2; in another they were between the first and second byte of s2. Does anyone have any idea where these 2 bytes could come from? I checked my code, and every place that writes to the stream is traced, so it doesn't look like they are actually written to the stream. It might be worth noting that s1 is always 0, in the current implementation.

View 1 Replies

Stream Video From Network PC Via Webcam?

Jan 18, 2006

I have a little Logitech USB Webcam that I have attached to a laptop and I want to be able to view a video stream from it. I already gathered it will need to be a client/server model...and I probably need to use TCP/IP and/or Winsock (if its still even used)...

how to really approach this application as far as the video capture process? I don't have a need to really record video in any way so if i can just "preview" the video thats fine, although recording would be a neat bonus.

I read into the Windows Image Aquisition libraries and they seemed to be the right thing...but I wasn't so sure about the cross-network half of the equation.

View 10 Replies

Writing Data Of Network Stream To Form?

Jun 1, 2009

I have looked over this and can't see where i'm going wrong, all i'm trying to do is add an item to a listbox when i a tcpclient logs on to the server. Code in question... If i put a breakpoint in i can see that initialclientresponse is set correctly.

Public Sub ConnectClient()
Dim pendingClient As TcpClient
Dim InitialClientResponse As String

[code].....

View 8 Replies

Stream Audio And Video In The Local Area Network?

Oct 26, 2009

I am developing an application where in I need to stream audio and video in the local area network. There is calling option from my application where users can call each other(audio call or video call) in the LAN.

View 3 Replies

How To Send Single Or Stream Of Bytes To USB

Oct 12, 2010

I would like to use the USB port power as source and use the an amplifier on D+/D- Twisted Pair signal wires as my command line. I saw a thread suggesting to use the output as PWM. How can I send a single byte or stream of bytes to the port. Is it possible to read status of the D+/D- if they are shorted together?

View 7 Replies

Send Data Twice Over TCP Stream For It To Be Recognized?

May 17, 2009

I am sending data over a tcp connection but I need send it in pairs for it to be sent i.e. 1st Send (doesnt work), 2nd Send (works), third Send (doesnt work), fourth Send (works)

View 1 Replies

Can Keep Stream Open And Send Images And Strings

Dec 27, 2009

I noticed when I send bitmap over a stream I have to close the stream where I sent it from in order to get it on the other end. Is there any way I can keep the stream open and send images and strings, or any other way of doing that? [code] 'I have to close the stream or it wont work, but I need to keep it open to send more images!

View 6 Replies

Send A Live Stream Of A Computers Screen To Another Computer Via For Example TCP

Jun 8, 2011

I'm thinking about how I'm going to connect a computer to a projector and I came to think if it is possible to send a live stream of a computers screen to another computer via for example TCP or some other protocol. It must be possible since for example TeamViewer and other long-distance IT-support applications can do this. The thing is that I dont have a clue about where to start. And is it difficult to output the stream once it's recieved?

[Code]...

View 1 Replies

How To Send Network Msg In .net

Jul 14, 2011

I have an application where i have to schedule some msg to my network users and as per the sheduler msg should be popup on their machine on local network.

View 3 Replies

How To Send Commands Over A Network

May 26, 2010

I have never programmed a network program before and would like to learn at my own pace. Also I am not asking anyone to write this complete program for me, just bits of code to help me write a complete program. (though if you do code it all I won't complain.) I already tried using internet tutorials but none of them seem to work.I am trying to program a simple form with 4 buttons, and 2 users.The first button is a connectivity button. "Green" for connected, "Red" for not.The second button is a "Connect" Button which will connect to another computer with this program installed/active. (I want it as simple as possible)and the next 2 buttons switch between "1" and "0" depending on user input(Default "0"). the first button is the local user button and the second is the remote user button. When the local user clicks the local button then what he/she changes it to will be displayed at the remote site. The same thing will happen with the remote user.

I know how to place all the buttons where they belong, and to change the local text, but I have no Idea how to connect to a remote program or to pass messages between the two users. Can anyone suggest some Simple code to do this. (something that I will be able to learn and use to make more complex code later on.)

View 2 Replies

Send An Image Over The Network?

May 1, 2009

I was wondering if there is an easy and fast way to send an image (or files in general) which is small, as in around 30KB, over the network using VB .NET. the most i was able to do at one point is to read the image (or file) as text, then send each character over the network, but it took way too much time for the file to get sent, and then translated from text to file once again on the other side. I don't know much about network programming, because i just started learning about the subject.

View 3 Replies

Send Files Across Network?

Jul 13, 2010

I have a xml file I want to send to a ubuntu server. I have created the xml file using a data table.

Before I was using the following to save on the current machine in the application folder. However, the customer has changed and now wants to store it on a remote network ubuntu server on the network.

What is the best way to send files across the network? Is it possible to send files from a windows machine to a ubuntu server machine?

View 3 Replies

Send Text To Another PC In The Network?

Nov 22, 2009

i want to send Text over network to another pc. The text should be seen in a MessageBox.What technique could i use? Is UDPClient the right thing?

View 1 Replies

C# - Read From A Url Into A System.IO.Stream Object?

Aug 3, 2009

I am attempting to read from a url into a System.IO.Stream object. I tried to use

Dim stream as Stream = New FileStream(msgURL, FileMode.Open)

but I get an error that URI formats are not supported with FileStream objects. Is there some method I can use that inherits from System.IO.Stream that is able to read from a URL?

View 3 Replies

Test If Stream Object Is Open?

Jun 30, 2009

Is there a way to test if a streamreader or streamwrite is open? My application is something like this[code]...

View 7 Replies

Forms :: Send A File Over The Network?

Sep 4, 2010

I ahve tried using the

My.Computer.Network.UploadFile("C:UsersPhillipDesktop est.txt", "http://10.0.0.2/c:/text.txt", "my username, "mypassword")
but it does not work...whats the proper format for entering a location to a computer over the network?Also... whats a way to send a file to a computer over the internet such as my friends computer... The reason I am doing this is because I plan to make some programs that run based on text files and a basic example of this is a chat program... but I do plan for other things as well...

EDIT:Used this

My.Computer.Network.UploadFile("C:UsersPhillipDesktop est.txt", "\PHILIPADAMS-PCUSERSPhilip Adams ext.txt", "myusername", "mypass")

and it worked... now how can I send over the internet... Also is there another way i can send over the network like using the IP instead of computer name?Also how do I send it to other computers?

View 5 Replies

How To Send File Between PC's On Local Network By Using PC Name

Jan 24, 2012

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

Dim FileToCopy As String
Dim NewCopy As String
FileToCopy = "C:Users????DesktopfileName"
NewCopy = "C:Users???Desktop
ewfileName"

[Code]...

View 2 Replies

How To Send Variable Arrays Via Network

Mar 7, 2009

I am really new to .net, I've got the basics to a game down, I need to be able to send variable arrays between programs, I am aiming for local network first, then I'll tackle internet. Does .net have any simple way of doing this? Was difficult in vb 6. It needs to be fast so both machines get the same view of the game.

View 5 Replies

Send A Character To A Network Printer?

Oct 14, 2010

I need to create an exe in VS2010 with VB that does the same thing as a simple command line. The reason is related to debugging. I can type ECHO ~ > \WIN7MMF25$ in a command window on a W2K8R2E server and it will send the ~ character to the shared "printer" on the Win7 PC. Actually, the device is a cash drawer connected to LPT1 that pops open when it sees a ~ character.

Anyway, I created a CMD file with that command, saved it, fired it, and the cash drawer on the Win7 PC opens. However, when I try to call that command file from our ERP application, it doesn't work (it does work if the remote PC is XP, though - just not if it is Win7 or Vista).

Anyway, I was hoping if I created a simple EXE and called THAT from the ERP software, perhaps whatever issue is bugging us will not bug us anymore.

View 5 Replies

Send Message To Another Computer Using LAN Or Network?

Oct 20, 2010

to do a program that can send a message in other computerthru LaN or Computer NetworkExample im in Server and i will send it is \PC-01here is the picture i design it but i don't know the code

View 1 Replies

Send Voice From Headphone Through A Network?

Dec 30, 2010

I am new to VB.NET and I need to develope an application that will enable me capture voice(Probabily from headset) and send it to another listener over a network.

View 1 Replies

VS 2010 Encrypting A Serialized Object Or Stream?

Mar 7, 2011

Basically, I need to transmit data across a network from point A to point B using a Binary Serialization System. I'm doing this to make sure that the system can't have outside listeners read the data being sent easily and to keep results secure and confidential.What is an easy way that I can encrypt, say, a generic object? Would it be easiest to serialize it to file, read the bytes in, encrypt the bytes, then store the bytes in a serialized structure and send that across the stream and reverse the process?

Private Function EncryptClass(ByVal obj As Object) As Byte()
Dim key() As Byte = {52, 15, 85, 150,
45, 12, 78, 120,

[code].....

View 6 Replies

Send AT Commands To Router Network Port?

Aug 9, 2010

How can i send AT commands to my router network port?

View 6 Replies

Share, Send And Receive Files Over Network?

Feb 3, 2008

I'm working on a network chat for my office I want to add a way for users to share files or be able to send and receive file.

View 7 Replies







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