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


ADVERTISEMENT

Asynchronous Socket Programming Vb 2008(.net) Again Server Should Able To Send The Data To Client

Feb 2, 2011

I am facing problem in asynchronous socket communication.

1)I wanted to perform connect(from client to server) operation on enter button and send the data whatever client want to send and disconnect from server. And again client should get connect to server whenever client wanted to send data. this is the mechanism.

i.e how to reuse the socket.

2)Again Server should able to send the data to client.

View 5 Replies

Communicate From Client To Server From Multiple Clients On Multiple Requests In Socket Programming?

Jan 8, 2010

I have been struggling to find a solution for this problem. What I need to do is build a server application that accepts tcp client requests from different clients running on same port say:1003. I experimented by using asynchronous mode call backs etc. but it disconnects once connection is established and does not respond for further requests from the same client.

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

Client Server Program Without Winsock?

Apr 16, 2011

how can i make claint/server program without winsocet

View 1 Replies

VB 2010 Winsock Client / Server

Jun 15, 2010

I am currently learning how to program in VB and am using sample code to make a VB Winsock client and server. I beleive the sample code was from VB 6.0. [code]Overload resolution failed because no accessible 'GetData' accepts this number of arguments.I am getting the exact same error in the exact same place in the server aswell. I have tried removing the vbString, but it comes up with a warning and the program doesn't function like it should. I am programming this in Visual Basic 2010 Express.

View 3 Replies

Client Socket - Send Message Through Client Socket Receive Specified Argument Was Out Of Range Of Valid Values

Oct 15, 2011

Below is my code, but when i send the message thru client socket i receive Specified argument was out of the range of valid values. Parameter name: size

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

Dim serverStream As NetworkStream = clientSocket.GetStream()
Dim outStream As Byte() = _
System.Text.Encoding.ASCII.GetBytes("0800822000000000000004000000000000000920092126012345001")

[CODE]...

View 1 Replies

Winsock - Code A Client - Server Program

Sep 6, 2009

I am trying to code a client - server program. I have 4 winsock controls on my main form. The client is able to connect to a free one just fine, and can figure out if they are all in use. When testing my program, I found that when I try to send data through a socket, then send different data directly after, it jumbles the data together.

CODE:

That is the code I am using. When the client is connected to the server, and ready for data, it sends the packet "@Ab". When the server receives this packet, It is supposed to send the welcome alert, and then current events posted in the server.

On the client side, there is a message box that is supposed to show the welcome alert, and at the bottom on a status strip, the current events are supposed to be listed.

When the welcome alert shows, it contains the alert text fine, but then shows the packet for the events after it.

View 3 Replies

VS 2008 : Making A Chat Client And Server With Winsock?

Feb 10, 2010

Make a Chat Server and Client using winsock:I want to have a Login forum and Be able to ban user and Give them ranks I would like it to Use INI files.

View 2 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

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

Combobox Unhandled Exception - Make A Basic Winsock Chat Server And Client?

May 31, 2009

I want to make a basic winsock chat server and client, and I just need to know the basics, like.How do you determine where to send the data?How do you determine where to receive data from?How to actually send and receive the data?I just don't want to read from a website that has a lot of extra information. I just want to start off with the basics so I can actually learn.

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

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

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

Simple Client-server Application Programming?

Nov 18, 2010

I'm trying to learn how to do some very simple client-server application programming.

Basically, I want to make a program (the server) that listens and waits, and when a commend is sent it will run a batch file or execute a line of code.

The client will just ask for the ip and send the command when a button is pushed.

Shouldn't be too hard right? So what are some good resources that you've used to get started?

View 1 Replies

Remote Desktop Application? Safe To Use Winsock In Creating A Client/server Application?

Jul 18, 2012

Im planning to create a Remote Desktop Application and I'm having problem with viewing other computers monitor or screen.

Im not asking for the code on how to do it. and one more thing is it safe to use winsock in creating a client/server application?

View 3 Replies

Sockets - Winsock Replacement - Any Decent Public Classes With Events That Wrap The Socket Class?

Jan 25, 2011

I'm trying to update an application from vb6 to vb.net. The orig app used the winsock control. Unfortunately I can't nor do I want to use it in the re-write. Are there any decent public classes with events that wrap the Socket class?

View 1 Replies

Winsock Client Connects Once But Not Twice

Jul 3, 2011

I've had a problem which Mike has kindly helped me with here: url..I now ahve a problem when disconnecting then trying to connect again. The app works fine once, but throws the exception again if you try to connect the client a second time.

View 4 Replies

Multiple Client Handling Using Winsock

Sep 13, 2010

i write a server program using vb.net but i can not accept multiple client at same time.

[Code]...

View 4 Replies

VS 2008 TCP Server / Client - Client To Send The Server 4 Numbers - Depending On The User's Choice

May 9, 2009

how to create a client/server... But I couldn't... I don't want anything fancy. Just want the client to send the server 4 numbers, depending on the user's choice; after that, the server would turn off the pc, restart it, etc. It all depends on the number received. Is there a rather "simple" way to do it? If it's not to much trouble you could use Atheist's example. (Btw I don't understand the code and, yes, I've checked on [URL])

View 9 Replies

VS 2010 : Send Data From Client To Server (encrypted) And The String Sent From The Client Is Not The Same As Received From The Server?

Jun 27, 2011

Hey guys, I am trying to send data from client to server (encrypted) and the string sent from the client is not the same as recieved from the server. I've been killing my brain for hours to get this to work but I cant manage. Im converting everything to Base64 string.

Client:

Public Sub SendMessage(ByVal msg As String)
Try
SyncLock myclient.GetStream
sw = New IO.StreamWriter(myclient.GetStream)

[code]....

View 4 Replies

Asynchronous Socket Programming?

Feb 23, 2010

i'm creating an Asynchronous socket programming in vb.net. i've utilised the code from Asynchronous client and server code frtom the following links:m a new user so could post only one link fully)When I try to connect the for more than one client the second client always waits until the first clientcompletes the call. i want the clients to accept calls at the same time

View 1 Replies

Socket Programming In .NET 2008?

Jan 25, 2008

how to do socket programming in VB. I'm using VB.NET 2008 and i'm a novice but with a reasonable understanding of programming so I want to learn by examples and understanding it in a novice/intermediate point of view. Essentially, I want to create a simple TCP or UDP client that can connect to an IP and port and retrieve the stream for parsing of content.

View 5 Replies

Socket Programming With Many Forms?

Mar 8, 2011

I've been making this project for our Major course in Networking Principles and Programming. Our project is an ATM System but with the use of Socket API. My partner and I chose VB.NET even if we're completely beginners.

We've researched about Socket programming in VB.NET, and we're glad that our Client-Server connection worked out. The problem is, our system contains many forms (Withdraw, Deposit, etc). We've researched the Google about Socket Programming in many Window Forms and unfortunately, we can't find any.

How can we be able to maintain the connection with many forms? Or do we have to create a new connection on every form? Is it better to create only ONE form for the client application perhaps?

View 8 Replies

VS 2008 Socket Programming?

May 4, 2010

i'm currently using my computer as host and client.. i ran the program and the console application for the server started.. but how will i be able to run the form application for the client? can VS run 2 programs at the same time?

View 6 Replies

VS 2008 TCP Client Responding To The Main Thread Like Winsock?

Apr 15, 2010

I have a user app written in VB which up till now has relied on winsock to connect to another device we have. The user app logs onto the device and then send / receives status reports from it which are used to set the controls on the apps forms.

This has all worked well for a long time but I'm now looking to move away from Winsock as I know it's not 'the right way' to do things and I also need to be able to send non ascii characters between the app and the device it's connected to (implementing multi language support).

The issue is with Winsock it would simply throw the DataArrival event when a message was received and I could then process the message and act upon it. When using a TcpClient socket connection I'm running into problems as all responses are on the socket thread which means I can't simply change controls on the main form without using the Invoke check.

What I want to be able to do is have the thread running the TcpClient simply alert the main form thread when it receives data and make that data available to the main thread so it can start processing it and triggering all the other functions etc required (these also interact with the Form). Whilst this is happening the TcpClient monitors any further messages and sends response messages as requested from the main thread.

View 9 Replies

C# - Connection In Win7 Using Socket Programming

Jan 2, 2012

I am using socket programming in vb.net to create a server client remoting application. The problem occurs when I use both the client and server in a win 7 box. It works fine for win xp or cross-platform communication (e.g. win xp to win 7). Below are the codes used at the client and server end:

[Code]...

View 2 Replies







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