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


ADVERTISEMENT

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

.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

Change The Execution Sequence (Client Side Click, Server Side Click) To (Server Side Click - Client Side Click)?

Jun 22, 2011

I am struckup with a problem from last two days. I am creating a web application using VB.NET, Ajax & RAD Controls. When user clicks on a button I want to open a RAD Window and show the list of ledgers available to the user, so that he can select one from the list. And to open that window I have to call a java script function from client side, which is already achieved using the below code.

[Code]...

View 8 Replies

C# - Send An Object From Client-side Javascript To Server-side Code Via ASP.NET?

May 23, 2011

Can I send an object from client-side javascript to server-side code via ASP.NET ?

View 5 Replies

Fire Client Side Code From Server Side At Runtime

Apr 13, 2010

I know this defeats the purpose of client side vs. server side (refer to title of this thread). What I would love to do is build my own custom progress indicator on the client showing how far a server side code has progressed. I figure if I could only get a JavaScript to fire and render a value of some control at pre-defined intervals while the server is working I could make it happen - but alas I'm beginning to believe that this is impossible. Below is some code that performs three 2 sec loops. At the end of each I want to change the visible value of a control on the browser. [Code]

View 8 Replies

Javascript - Format Data (client-side) For (server-side)

Jul 13, 2011

Using the following script:

$("#some_button").click(function() {

var changed = [];

[CODE]...

I need to send back the id, the old value from _1 and the new value from _0 back to the server. What is the best way to format this data so I can easily extract the data from the server side so I can easily email someone for example to let them know which textboxes have changed, what the old values were, and what the new values are

At the serverside level, I am using .NET-3.5 (VB). I know how to send the data bacl. and how to email the data, I just wanted to know how to best format the data at clientside before sending it back. I could have upto 50 sets of id, old, and new values to send back. Sorry for not making that clear earlier.

Example:

How can I modify the script above to generate this?

[
{
"id": "name_0",
"new": "text",

[CODE]...

View 3 Replies

Timers On Server-side - From A Client-side Piece, Call Off To A Server-side Piece

Apr 22, 2011

I'm trying to, from a client-side piece, call off to a server-side piece. I need to do this synchronously. On my server-side code, though, I'm calling off to another piece of code, which I want to have a maximum of, say, 10 seconds to return a value. If I don't have a response within 10 seconds, I want to force my own server piece to set my result equal to 0, and return to the client.

Here's what I have on my server-side code so far:

Public Function GetWebResult(ByVal inputParameter As Object) As WebReturnObject Implements IWebInterface.GetWebResult
Dim result As New WebReturnObject
Dim webItem As WebItem = Nothing

[CODE]...

I realize this code is not functional. The problem is that I'm unsure how I would go about getting back into GetWebResult to set the appropriate return values before it is sent back to the client.

View 1 Replies

Asp.net - Server Side Doesnt See Changes On Client Side?

Jan 25, 2012

I add an option to a select with jQuery. When I save with an asp button, I don't see the changes on the server side in the click event.

And the HTML is all correct after I add the option.

Is it a coding problem or I don't understand something?

$(selectCourant)
.append($("<option></option>")
.attr("value",$(dropdown).val())
.text($(dropdown + " option:selected").text()));

View 1 Replies

Writing A Program With 1 Client And Server Where Client Side Creates A Text File

Dec 1, 2008

I have been reading through Atheists posts in regards to client-server and TCP client/server connection's. But how do i go about writing a program with 1 client and server where the client side creates a text file.Once the server sees there is a text file it connects and downloads it to itself or the client pushes the text file to the server.Once on the server i will read the text file and put its info into a sql db.

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

Javascript - Register A Client-side Event Listener On A Server-side Event?

Dec 28, 2011

Ultimately, what I want to accomplish is an AJAX-based messaging system. I already have a database table for messages, and an ASPX to add new messages (and declare old messages no longer relevant).

The current messaging system simply polls the server every 15 seconds, and re-pulls the current message set.

What I am looking to do is: On $(document).ready(), register an ajax callback function that listens for a server-side event (e.g., MessagesUpdated) On table insert/update, fire MessagesUpdated server-side.

This way, whenever the table is updated (or new records added), any clients listening know that new data is available and can re-poll the server then.

Ideally, I'd also like to make the new data available as an event argument (to minimize re-polling the db).

I can find references to something like this in other languages, but I cannot find any actual code examples to get me started.

Assuming this is possible to do via .Net, can anyone help get me started on this?

I'm using the 2.0 Framework. Also while I added a VB.Net tag, I can read C# reasonably well, so please feel free to post in either language.

View 4 Replies

Managing Multiple Client Socket Connection?

Sep 11, 2011

Am developing a server - client application using the system.net class , that will have more than 5000 simultenous client connection.what is the best way to manage multiple client connection like this?

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

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

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

VS 2008 Chat Server/client - After The Client Clicks Disconnect Or Closes By Task Manager, Looses Connection

Aug 18, 2009

Im using the code from [URL] as a starter, most of the code is the same. the chat system works fine but on the client a added a disconnect button "clientSocket.Close()" and as soon as i click that i get errors, on the client, this is the code...

Private Sub getMessage()
For infiniteCounter = 1 To 2

[CODE]...

And this line...

serverStream.Read(inStream, 0, buffSize)
gives me "Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall."

Now im talking the server, after the client clicks disconnect or closes by task manager, looses connection, etc the server crashes and gives me.

View 5 Replies

Assign Server Side Loop Variable To Client Array?

Dec 29, 2011

Code of my web page.I made changes according to ur suggestions but title is invisible or not displaying what has missed by me [code]...

View 1 Replies

Javascript - Server Side Read Label Client Change

Jun 3, 2012

I've got a bunch if labels that are changed as a user inputs data into a form of mine. The Labels are changes with js on the client side. I then after all the submission are in put use a vb script to pull the string values from these labels. The problem is the vb net part is not reading the new values of these labels. Anyway I can get it to read the new values? I have over 40 labels.

[Code]...

View 1 Replies

VS 2005 Remoting With Server's Event Handling On Client Side?

Oct 26, 2009

Anyone has a quick and dirty sample coding to making this work? Currently, I have server, client with Interface object as intermediate object between the 2. If I declare events in the Interface, then Dim object on client side with "WithEvents", I'll get error when I reach this line:

vb
serverObj = CType(Activator.GetObject(GetType(InterfaceObj), szURI), GetType(InterfaceObj)

Having headaches looking for solutions.

View 7 Replies

[2005] Launch Process.Start On Client PC Instead Of Server Side?

Feb 1, 2009

I am building an internal web page which retrieves binary data from a SQL database, converts the binary to an image file, then opens the file on the clients PC.In debug mode, this works fine, because the program downloads the file successfully into a temporary directory, converts it to the image then uses System.Diagnostics.Process.Start() to launch the image file in the associated image viewing program.However, as soon as I upload it to the server, two undesired things happen:

a. The file gets saved on the servers temporary directory, instead of the client temporary directory (I kind of expected this to happen, so this wasnt much of a suprise)

b. System.Diagnostics.Process.Start() does not launch the file successfully. Nothing actually happens when it gets to this part of code, however I suspect that it is trying to launch the process on the server end, instead of the client end.

how I can get System.Diagnostics.Process.Start() to launch on the client end OR how I could get the image to just appear in the clients web browser instead?

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

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

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

Javascript - Client And Server Side - Make The Rows Not To Be Deleted Once The Page Is Refreshed?

Sep 7, 2011

The problem im having is that I have a table that when a user click on a button it adds a row to the table via javascript, which works fine. The problem is that if a user need to update other data the user click another button which refreshes the page and all rows the user created in the table are deleted. My question is what can I do to make the rows not to be deleted once the page is refreshed? I know some might think, just not refresh the page, but there is to much data that has to be displayed and a new query has to be generated to grab the data.

[Code]...

View 3 Replies

The SMTP Server Requires A Secure Connection Or The Client Was Not Authenticated. The Server Response Was 5.5.1 Authentication Required

Nov 28, 2009

This emailing code wont seem to work in my program. I get an exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was 5.5.1 authentication required."

Imports System.Net.Mail
Public Class emailStudent
Private Sub sendEmailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sendEmailButton.Click
SendMail()

[code]....

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

Connect VB Client Application With SQL Server Using TCP Connection (LAN)?

Feb 15, 2012

I've been Searching the Net for hours now, and i can't really seem to find anything clear and straight to the point.

I need to create a Server/Client application using VB.net 2008, it's actually my first time to have a database on another computer. So I first searched the internet for the things i need to make this software.

[code]...

View 5 Replies

Connection String For Client-server Application?

May 5, 2012

I want to create a client-server application, it means I just need 1 database on the server.I have a computer and a laptop. I set my laptop's IP to 192.168.1.1 and my computer's IP to 192.168.1.2.Now I place the database on my computer, the database name is db_transportasi.Problem is, how to connect my computer's database from my laptopSpecification :I'm using this string below for my connection :Data Source=ARVID-THEODORUSSQLEXPRESS;Initial Catalog=DB_TRANSPORTASI;Integrated Security=TrueI already setup my SQL Configuration Manager, enabled the TCP/IP, switch to the IP Addresses tab and set the IPAII Port Properties to 2301I turned off my firewall so I don't have to set any exceptionQuestion

View 4 Replies







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