Socket Server, Windows Form App?

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


ADVERTISEMENT

VS 2005 MultiThreaded Server Socket: From Console To Windows Applications?

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

Windows Service Running Socket Server On Specified Port (Secured)

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

Identify Connection Lost Between Socket Server And Socket Client?

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

Info: Multithreaded Server Socket Program Or Client/Server?

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

SQL Server 2008 Configuration For Client Server (Windows Form) Application

Apr 6, 2012

Case : I'm creating an application (desktop application) with VB.NET (actually windows form), and using SQL Server Express 2008 for its database.

[Code]...

View 1 Replies

C# - Windows Form + Database (Sql Server)+ Windows Mobile Application?

Mar 17, 2011

i am doing project of Order Accepting system for five star hotels.Scenario is Waiter will accept order using Window Mobile which is Connected to WiFi present in hotel.I want to communicate to database(Sql Server) present on My Machine (Computer present in kitchen) through WiFi and Add order into table present inside database. This should notify my application present on Compter and should print order. After completion of Order Application from kitchen will notify to waiter about completion. My problem is How to Communicate with database present on Remote computer using WiFi from windows Mobile.

View 2 Replies

Chat (Using Socket) Server In Web Hosting?

Nov 29, 2011

Read this: [URL]. Now the question: I want the client will connect to web server (or web hosting).

View 8 Replies

How To Connect Socket To Server Rapidly

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

Socket Server: Transferring To WinForm App?

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

VS 2010 IRC Server - Socket System

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

Client Server Winsock Or Socket Programming?

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

Communications :: Socket - Connecting To Port 80 Of Server

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

Socket Programming - Close A Connection From Server?

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

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

VS 2008 - How To Get Image From HTTP Server Via Raw Socket

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

Viewing VB6.0 Windows Form In "windows Server 2008"

May 21, 2009

I am facing problem in displaying VB 6.0 windows form when it is accessed from activeX control on windows server 2008 Is there any work around or any patch available to resolve this issue

View 2 Replies

.net - Check The Connection State Of A TCP Server (Socket) With TCP Client?

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

Get The Client Connection Parameters Of The Socket On Server Side?

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

Java Server Socket, Reading Content From DataInputStream?

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

Prevent The Application Is Closed, When Close The Server Socket

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

TCP Client Error While Reading Data From Socket Server?

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

TCP Server Not Reading From Socket Untill Objects Disposed?

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

VS 2010 Socket Chat Is Not Receiving On Java Server

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

Send File With Windows Socket?

Jan 10, 2010

I`ve been reading alot of tutorials on hwo to do this but i can never get it to work. I have a file named Book1, and I want to move it and call it "Book2".

There are .xls (Excell spreadsheet). Something is wrong with reciver when I open Book2 It says "System.Byte[]"

The test file "Book1" Has "Dog, Cat, Cow," In A1 A2 A3.

I think my byte conversion isn't working.

A tutorial said to use "Encoding.ascii.getstring(byte)" but Encoding is not delaired.

Imports System.Net.Sockets ' Allows us to make and listen to connections from another user
Imports System.Threading ' Multi Threading

[Code].....

View 2 Replies

Windows Socket Error (VB 2008)?

Jan 25, 2011

My code works fine under xp pro but not under windows 7 ?System.Net.Sockets.SocketException = {"The system detected an invalid pointer address in attempting to use a pointer argument in a call"}

View 1 Replies

Mass Email Using Sql Server 2005 In Windows Form

Jun 29, 2009

I am doing a project on sending mass email. My codes should be able to read contacts/email from the SQL Server 2005 database and send mass email with attachments.Below are my codes for sending email. My windows application limitation is that it can only send email from a valid email address to a valid address one at a time with the help of a relay server. Also, it doesn't allow the user to attach attachments and could not read from the sql server database.[code]

View 1 Replies

Mass Email Using Sql Server 2005 In Windows Form?

Jun 29, 2009

I am doing a project on sending mass email. My codes should be able to read contacts/email from the SQL Server 2005 database and send mass email with attachments.

Below are my codes for sending email. My windows application limitation is that it can only send email from a valid email address to a valid address one at a time with the help of a relay server. Also, it doesn't allow the user to attach attachments and could not read from the sql server database.[code]...

View 7 Replies

Specific Cast Is Not Valid In Client Server Socket Program

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

VS 2010 TCP Chat Server Closes Socket On Client DisConnect?

Jun 24, 2010

I am working on a chat client and server, and so far it works well, but when I close the client, the server throws an exception because it continues to try to do processes on the disconnected client. I have tried adding clientSocket.Close() in various places throughout the client and server with no luck. Does someone know how to add the disconnect code to either the server or client with this code?Server:

Imports System.Net.Sockets
Imports System.Text
Module Module1

[code].....

View 5 Replies







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