Socket Server Crasher - Enter IP And Port?
Mar 11, 2010
I have an application to make a server and clients to read/ send text to it but I want a program I can run from a remote computer that you enter the ip and port and it crashes the server.
View 2 Replies
ADVERTISEMENT
Apr 21, 2008
I am new to socket communication. I found a few samples on the web and I managed to make my own host-client communication but i wanted to go a bit further and connect to port 80 of a server and it was just a disaster! First of all I know I can just use the functions that vb has itself but I want to make my own connections ... I have got some reasons I need this one! Do I really have to make them "connect" or just somehow without connecting I get the data? So I'm stack at the point that the connection is made ... it refuses to connect.
View 7 Replies
Jun 30, 2010
I wanted to know what are the risks of opening up a socket server on a specified port? Right now I have it limited to only accept requests from 1 specific IP to that port and all the other ones get rejected (using the windows firewall), is there a way to implement an authentication or anything else so I can allow it to be accessed from any IP worldwide yet have it secured?
View 1 Replies
May 21, 2011
I wrote a Socket Client which will send the Socket Server some data and get some response from Server. This process will be running once in every 2 seconds.
Now what I need to know is How we can identify the connection lost between Server and Client?
I need this to be implemented in the Client side. If there is no connection then Client should automatically close the connection. Once the connection with the server is available in the next attempt it should connect automatically.
View 1 Replies
Apr 17, 2008
I have a socket which I use to monitor data on a specific UPD port (Let's say 1200).[code]...
View 3 Replies
Jun 2, 2010
I have a device which send me data over a particular port. The data is in XML Format.
Now I already did a small console application which listen for the data and print out the data on the screen.
Now my plans are to deserialize the xml data or I will create the insert statement into the database.
1) The device send me the data every second (if there is data to send me).
2) I cannot say how much data the device is going to send me.
How can I make sure to capture all data without loose any information..
View 2 Replies
Aug 14, 2009
I'm having this problem with a networked app in vb.net. If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted on how I can reclaim this port, or how I can close it? I tried using the reuse address socket option
[Code]...
View 7 Replies
Mar 23, 2009
My current project is a program that collects meteorolgical data on one computer and allows to access it from any other computer on the net.Everything is working fine so far - it is collecting the data, doing some computation and then listening (as server, TCP) on some port for a client who is interested in downloading this data.When it receives some short command string (something like "GET DATA") it just starts sending the data to the client. The transmission works.
At this point I am getting a bit nervous because I absolutely have no idea on the programming basis of viruses and other malware:When the program is listening on the port (for which I have to allow an exception in the firewall) is there any danger that malware from outside intrudes into the computer?(running Windows XP with latest service packs installed, firewall enabled, antivirus-program installed (is this necessary if there is absolutely no internet activity on the computer besides of this data sampling / server program?)).
If there is danger, what could I do to protect the computer aside from closing the port which I need for communication with the external world?Can you point me to some URL where I can alleviate my ignorance of the basics of malware functioning (on the software level)?
View 11 Replies
Sep 30, 2010
I'm writing a remote desktop software that starts a connection in reverse mode, using RDP API. My problem is that I try to setup the port that the listening socket may use, but it seems not working: it uses always a random port. [Code] The problem is the seems PortId is ignored: my connection string reports other ports number, and the incoming socket is open on port different from 4000.
View 1 Replies
Oct 26, 2011
I made a simple TCP server (I've found the example on the web) in VB to receive data from about 40 TCP clients.The clients are not synchronized but sends data about every 18 minutes; the problem is sometimes several clients sends data at the same moment, so I can't receive data.I also made a second program that reads the data (server program writes data on a file, read from the second program) scheduled.
My question is this: I've seen on the web examples about Multithreaded Server Socket Program, so I suppose this could manage my 40 clients (but now the clients are syncronized and send data at the same time in client mode) or is better get data (I have a central client that asks data to all 40 devices in server mode)?
Second question: can I make a single program where I run both TCP client and TCP server at the same time?
View 1 Replies
Sep 21, 2010
I've inherited a tested function that processes incoming data from a .NET Serial Port. (Dim RXBuffer as string = serialport1.ReadExisting) I've written a different part of the application that processes a byte array as received from an asynchronous .NET socket.
Is there a way I can convert the byte array into a string as if it arrived from the serial port?
I would prefer to rewrite a very long 'if statement' into byte array functions syntax that look like:
dim b as boolean = IsBitSet(state_buffer(i), j) 'rather than:
dim b as boolean = (Asc(Mid(RXPacket.Pdu, CInt((i - (i Mod 8)) / 8) + 1, 1)) And CInt(2 ^ (i Mod 8))) > 0
View 3 Replies
Aug 11, 2009
SocketException was Unhandled: Only one usage of each socket address (protocol/network address/port) is normally permitted I get this error every time i click collect a second time.
[Code]...
View 3 Replies
Nov 29, 2011
Read this: [URL]. Now the question: I want the client will connect to web server (or web hosting).
View 8 Replies
Jan 23, 2011
I'm using sockets to connect to servers and for some strange reason I can't identify, the socket is taking several seconds (5 maybe 6) seconds to connect when using an IP whereas is instant when using a hostname. Here is my code to connect:[code...]
In the above code, server of course is a string. I've tested this with a friend and she's experiencing the same issue and I'd like to get around it as it's sort of annoying..While debugging GetHostEntry is the line that seems to take forever when using an IP.
View 1 Replies
Jun 7, 2010
i took this code from another example, it works fine but it a windows console application.i took the code into a windows form app but it looks like i have to change somethingto start, it says client is not defined, so what should i use?lient.startClient(clientSocket, Convert.ToString(counter))
Dim serverSocket As New TcpListener(8888)
Dim clientSocket As TcpClient
Dim counter As Integer
[code].....
View 4 Replies
Dec 16, 2008
transfer this from a Console app to a WinForms app? I'm still new to this and I want to build on top of this once I get more acquainted with VB.net. I don't know if this may be helpful, but I'm using Visual Studio 2008 (not express).
The Server Code I Found Online:
Imports System.Net.Sockets
Imports System.Text
Imports System.IO
Imports System.Net
[code].....
View 1 Replies
Aug 3, 2011
i'm creating an IRC server and I already have a few base classes complete like logging and Config. I was about to start with programming the socket class(es) when I realized that I have no idea how to make such a complicated socket system. I do not under any circumstance want to use any other code than my own since that would not help me learn sockets. I am familiar with a single connection socket system like most tutorials use.
[Code]...
View 2 Replies
Jul 14, 2009
how to access client side activity i.e. which client is connected and which computer connected at the same time from server.
View 1 Replies
Nov 24, 2011
I have the following code in my Server Form:
Imports System.Net, System.Net.Sockets
Public Class ServerForm
Private serverSocket As Socket
Private clientSocket As Socket
[code]....
for the first time, when I click on Connect, it is going to connect to server as well and also it works if you click on the disconnect. for the second time if you click on the Connect button, it gets connected but the disconnect button is not working.
View 9 Replies
Apr 7, 2010
I am using Async socket class to handle HTTP data. The OnRecieve event handler looks like this:
Private Sub sck_onDataArrival(ByVal sData() As Byte, ByVal BytesTotal As Integer) Handles sck.onDataArrival
Try
Dim ms As New IO.MemoryStream(sData)
Dim returnImage As Image = Image.FromStream(ms)
Picturebox1.Image = returnImage
Catch ex As Exception
Debug.Print(ex.ToString)
End Try
End Sub
I realize this will not work because the byte array still contains the header information from the response from the server. How to strip this data without converting the byte array to a string. I need to strip the header response information and just be left with the image data and from there convert that data into a stream so the stream can be loaded into an image and displayed in my picturebox.
View 8 Replies
Apr 23, 2012
For almost a week I am reading and trying to find a solution for checking connection state using a TCP Client (using socket class) In my scenario I have a TCP Client that is connected to a server (it is not controlled by me) and i want that from time to time to check the connection state, and reconnect if necessary.I have read a lot of information on the internet but i did not find a suitable solution.Briefly, these are the methods that i have found on the internet and try to implement.But unfortunatelly, i have found some scenarios where the TCP Server is closed and the TCP Client is still saying Connected 1.Example from MSDN
[code]...
View 1 Replies
Sep 13, 2011
I want both the client and server to write and read resp. at a constant rate (which can be configured on the GUI of the client) to the buffer.I am able to send from the client at 150 bytes per packet Now, I should be able to read also at 150 bytes per packet on the server too Since, both are connected through a socket, can we retrieve the socket params (set on the client size, like 150 here) from the server end, using the tcpServer object.Or is it must to send an initial setup packet which tells about these client params and so accordingly the server can continue?
View 1 Replies
Apr 21, 2012
So I have set up a basic client/server connection and I am trying to send a message to one another on connection, I got the client to receive the message from the server, but the server doesn't recieve the clients message. Here is my current code for reading the sent data from the client:
ServerThread.socket = new ServerSocket(5556);
Socket client = ServerThread.socket.accept();
DataInputStream in = new DataInputStream
[code]....
View 2 Replies
Jan 12, 2012
I created a server-client application using the asynchronous socket. I found the problem when closing a socket on the server, applications so closed. The procedure that I do to close the socket server is:
Terminate the listening thread. Close the client socket is still connected to the server. Close the server socket.
How to prevent the application is closed, when I close the server socket?
Protected Friend Sub CloseServerSocket(ByVal IPAddress As IPAddress, ByVal socketPort As Integer)
' Terminate the listening thread.
[Code].....
View 1 Replies
Apr 20, 2012
I have a TCP Socket Client (using the Socket Class) that is connected to a simple TCP socket server (just for testing)I have this code snippet :
Dim aSocket as Socket
While aSocket.Connected = True
byteRead = aSocket.Receive(dataByte) 'number of bytes
[code].....
View 1 Replies
Nov 24, 2009
Please excuse my choice of wording and/or mixup of terms, I am a dummy when it comes to socket programming. I am trying to connect to a TCP server, write a message and process a response. I use the following code:
Dim tcpClient As Sockets.TcpClient = New TcpClient()
tcpClient.Connect(hostname, 9080)
Dim networkStream As NetworkStream = tcpClient.GetStream()
[code].....
View 1 Replies
Aug 17, 2011
I am making a java chat server, and a guy was able to connect to it no problem (however, he logged off for the night before I ran into any problems, so I couldn't see what he did). Here is my code on the VB form:
[Code]....
View 5 Replies
May 28, 2012
I have a tcp client and tcp server.How do I ping the server from the client, by specifying the ip and port of the server?
View 1 Replies
Jun 14, 2012
I am Working on Teghax Component.Using This Component we want to find out Block title attribute of dwg file in a client server socket application.
1> We get Block title attributes properly of dwg file in windows application form using the getattribute function().
2> We get Block title Attributes properly in that way:-We take a class library where we take a class.in this class we use getattribute function().Then We access the particular class from another project
But when we use the same class(Keep same structure) in client server socket program.Then it gives an exception.i.e ,"Spaicfied cast is not valid"I am Not getting any reply form teghax developer..I attached exception screen sort.Give me Suggestion How to solve this Exception
Code given Bellow :
Public Function Get_DwgFileAttribute(ByVal Sender As ClsTcpConnection, ByVal msgTag As Byte, ByVal message As String) As String
Dictionary = GetHashtable(message)
Dim varfilepath As String = CStr(Dictionary.Item("filePath"))
[code]....
View 1 Replies
Nov 23, 2011
I would like to make a multi-socket TCP server (to accept multiple clients at the same time).I'm working with Visual Studio 2005 Express, maybe that's why files on CodeBank don't work..I found on the web an example about MultiThreaded Server Socket programming, but this is done for "Console application" in this way:
[Code]...
View 7 Replies