C# - Client Side Sockets Library

Nov 30, 2009

Be able to instantiate the object and hook up the MessageReceived and ConnectionChanged events (or ones with similar purposes). Be able to send data (duh) When data is received, it fires the MessageReceived event on the same thread that the object was created on (this would be nice, but not absolutely required). Have a blocking and non-blocking options for connecting and possibly sending data.

View 2 Replies


ADVERTISEMENT

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

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

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

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

Async Sockets Client-server?

Jul 25, 2011

I'm using vb .net 2008 with 3.5 framework. (the following 2 classes are put in a DLL that i import in a main application)

Server class:

Code:
Imports System.Xml
Imports System.Net.Sockets
Imports System.Text
Imports System.Net

[code]....

Basically in my main application i am instantiating the client class from this dll, as well as the server one. On the client form i got a "send data" (SendFISA sub) and a "connect" button. After connecting the client and clicking on the "send data" i am sending to the server a string formed of some information created when instantiating the client class from the dll (i can't make that type of data public, but i'm just using a constructor to assign values to a class object, nothing special).

Now, when the server receives the data sent by "send data" button click it responds with "PKG_SENT" corresponding to the "FISASENT" string terminator(in the module) of the string that was sent. The "WRONG_MSG" constant is for when the string terminator is different from the 2 from above.

On the local disk, if the server cannot be reached, the client saves an xml file with this data. In the dll i made a timer that ticks every 5 seconds and checks to see if there is any xml file on the disk and sends it to the server if the connection is ok (trimiteXML sub). The server would respond with "XML_SENT" corresponding to the string terminator "XMLSENT"(in the module) appended to the read string from the xml file. After the file is sent it is deleted from the local dir.

The problem occurs when i click "send data" AND there are XML files to be sent from the disk. I believe they are interpreted by the server somehow at the same time because the message is neither "PKG_SENT" nor "XML_SENT", but it becomes a combination of the "WRONG_MSG_TYPE" and "XML_SENT", "XML_SENTG_TYPE". I have no idea why this is happening and i basically want the socket to wait with sending the files from the disks until the "send data" finishes.

View 9 Replies

Client/Server Using Sockets(Question)

Jul 31, 2011

i have this code from msdn and added some of mine..

Public Shared Sub DoAcceptTcpClientCallback(ByVal ar As IAsyncResult)
' Get the listener that handles the client request.
Dim listener As TcpListener = CType(ar.AsyncState, TcpListener)

' End the operation and display the received data on
' the console.
Dim client As TcpClient = listener.EndAcceptTcpClient(ar)

' Process the connection here. (Add the client to a
' server table, read data, etc.)

Dim networkStream As NetworkStream = client.GetStream()
Dim bytes(client.ReceiveBufferSize) As Byte
networkStream.Read(bytes, 0, CInt(client.ReceiveBufferSize))
Dim clientData As String = Encoding.ASCII.GetString(bytes)
MsgBox(clientData)
' Signal the calling thread to continue.
tcpClientConnected.Set()
End Sub 'DoAcceptTcpClientCallback
now the question is how can i put the clientdata from a listview?
i tried to put the listview control in this shared sub but i always got an error..
Quotecannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit initializer of the class
please enlighten me on this one..

View 1 Replies

TCP Server/Client - Disconnecting Sockets?

Aug 18, 2011

TCP Server/Client - Disconnecting Sockets

View 3 Replies

VS 2008 Ftp Client Server Using Sockets.

Sep 22, 2009

i have lots of confused ideas like should you transfer files using tcp? Example: I was thinking, I connect to server from client, open file in binary, division by packet size(bytes), send first packet to server, get request if file was delivered succesfully, send next packet. If I do it this way i would need something to know/increase packet size.

View 5 Replies

Program That Uses Sockets To Connect Server To Client

Aug 2, 2010

i made a program that uses sockets to connect the server to client but there is a problem with it when i try it on this ip"127.0.0.1"wich is not a real ip just a loopback to my computer it works just fine when i use my local ip it works as well when i use my main ip from http:whatsmyip.org it doesnt work at all i dont know why it doesnt say an error or an exception but its not connecting so i gave the server to a friend of mine i tried using both his real ip and his local but still not working i dont know why?i mean i am 100% sure of my code...

View 7 Replies

System.Net.Sockets Namespace - Use For A Chat Client?

May 31, 2009

How would I use this for a chat client? I'm not sure where to even start and the internet is helping me find much about it.

View 4 Replies

VS 2008 Client Server - Communicating Over Sockets

Aug 10, 2011

I am building a client-server type applications and they are communicating over sockets. This is the first time I am doing such a program and I have been learning off a web example and thought I understood it all but it would appear I am missing something as it starts to work then errors. Here is what I have:

VB
Dim serverSocket As New TcpListener(ListeningPort)
Dim clientSocket As TcpClient
Dim netStream As NetworkStream
Dim BytesFrom(1024) As Byte
Dim DataFromClient As String
[Code] .....

All of the above works and if I open up a telnet command window I can connect to my machine running this code on my specified port and in the command prompt window 'IDENTIFY' appears as it should from the above code. But it then gets to this block an errors on the second line:

VB
'RECEIVE FROM CLIENT
netStream = clientSocket.GetStream()
netStream.Read(BytesFrom, 0, CInt(clientSocket.ReceiveBufferSize))
DataFromClient = System.Text.Encoding.ASCII.GetString(BytesFrom)

Now as far as I can tell it shouldn't be processing the first line
[ netStream = clientSocket.GetStream() ]
Until I send something back from the client because then going on to the second line its trying to process something that isn't there yet.

The actual error I get is:
Specified argument was out of the range of valid values. Parameter name: size
On the line:
netStream.Read(BytesFrom, 0, CInt(clientSocket.ReceiveBufferSize))

View 8 Replies

C# - Dropdownlist Client-Side Filtering?

Mar 7, 2011

I'm curious about how to perform client-side filtering, where Javascript is involved (it may not need to be written, but his is what the user's browser will run). It shouldn't need ajax (though ajax related solutions are welcome).

I'm brand-new to Asp.NET programming. This example pertains to a problem I am having at work. I've done many years of application based programming, and even some php. But learning Asp.NET is giving me a hard time (something I wasn't expecting).I have three combo boxes. But I want to filter out what gets put into them based on what is selected and what is available (an extra table).

Here is the example code page. Right now there is only a blank Page.Load() in the code-behind .vb file.

[Code]...

p.s. I work in the morning, so I will be around again in about 12 hours. Off to sleep with another day of no solution. Example Project is where the initial code is from.

View 2 Replies

C# - How To Load Client Side Before Page_load .net

Jun 14, 2012

i have a question ( i am learning VB) is there is a way in vb.net to make the Me.LoadComplete loads after the client side , i develop this simple code to make it easy to understand my question

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.LoadComplete
MsgBox(myhiddenField.Value)
End Sub

[Code]...

when the page loads , the MsgBox will be empty but when you click the link button the MsgBox has the value you set in the javascript , so i assume that the page_load function gets excuted first
the question is how can i load the client content before the page_load ?

View 3 Replies

C# - Image Caching On Client Side?

Feb 24, 2011

I'm having a http handler that is retrieving images from the file system on the server. I need to cache these images on the client side(browser). For that thing i'm doing the following code

context.Response.Clear()
context.Response.ClearHeaders()
context.Response.ClearContent()

[Code].....

The thing happening with this is ... When i switch between the tabs its taking it from the cache... but when i hit the browsers refresh button its again going to the file system on the server. how to cache these images on the client side.

P.S: Cant do markup caching for all the pages im my application.

View 1 Replies

Client Side Application Requested

Jan 29, 2012

I am testing an application. In tableadapter configuration wizard, On server side:While choosing data source, I chose Microsoft SQL Server Database File.This gave the connection string as:[code]Now I want to use the same application on Client side (off course databse is stored in Data Directory of my application in Server Side) Now in tableadapter wizard, I choose Microsoft SQL Server Express.Is that correct?I have done all configurations for remote connection etc. and also done the firewall settings.When I run this test on client side, it returns error:Cannot open database "Database1.mdf" requested by the login. The login failed. Login failed for user 'MYHOMESERVERKh. Furqn'.Why does it go to Kh. Furqan while I am giving it SQLExpress, where the DB is attached. My server is MyHomeServerSQLExpress and connection is MyHomeServerKh. Furqan (Authentication is Windows Authentication, and no password for it)

View 1 Replies

Client Side Barcode Validator App

May 28, 2009

I want to have a Windows application. It should take data input via RS-232 or via USB from a barcode scanner that reads 3 of 9 barcodes. The data received must be validated against a CSV file on the local harddisk and the result sent back to the scanner. I need this application including source. Does anyone know such a tool?

View 2 Replies

Client-side Vs Network Application In VB?

May 27, 2009

I have a client-side app which I am working on. As I start to enhance the app, I am starting to wonder whether or not I should be building a network side app instead. My app in its current form sits on the client side and generates some text and XML files which are stored locally on the client side. The user reads/write to these files. However, I want to start working with SQL AND the processing time of my app is starting to consume resources (i.e. time and CPU) on the client side.

Can someone provide me with some highl level feedback on what one would do to make their client-side app a network app that multiple users would have access to. I realize more detail would need to be provided in order to provide thorough answer. However at this point, I really just want to understand how a network app would differ from a client app from a programminga and deployment perspective.This is not necessarily a VB question. Howevever since I am working in VB I though I would start in this forum. Feel free to move to the appropriate forum if need be.

View 7 Replies

Securing Data At The Client Side?

Jan 10, 2012

am [writing reading] from a plain text file usernames and passwords, but its an bad way of securing data, is there any other way to do this, most probably by using IV's, encryption decryption algorithms.

View 2 Replies

[2005] Client Side Application?

Jan 29, 2009

installed in a another system. For some quite time, the client system is sync with my system. I have updated its database, i also updated the clients executable files. I have never tough any references in the system.My question is, an error occurs occasionally which is "Object reference not set to an instance of an object". This error does not occur in my development environment but is displayed on the client's PC

View 2 Replies

Communications :: Socket Behaviour - Created A Client That Can Send And Receive Data Via TCP Sockets

Aug 26, 2010

I have created a Client that can send and receive data via TCP sockets. The objects stored on the serverside are the *exact* same object used for the client. They use the same send and receive protocols.

Now, when i send a string from the server to the client , it does precisely what it should do. However when I send a string to the server.... I do receive the string as an equal length of NULL characters. I run the server and client locally.

Basicly what can influence the behaviour between two completely identical objects performing the exact same task? I wonder if there is some socketflag issue if the TCPlistener.accept function returns a completely different setup then the one I R used to.

(if it is of any interest, the send protocol is asynchronious)

View 3 Replies

Call JQUERY Function From Client Side (VB Sub)?

Jul 13, 2011

How can i call a jquery method from vb sub routine?My code is when it returns false, the div which contains an alert message will show. Her'es my code, but its not working:

If res = Nothing Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "PopupMessage", "$('.styleError').toggle('5000');", True)
End IF

View 1 Replies

Retrieve Session Variable Client Side?

Jun 8, 2011

Currently, in my web application I have a listbox that gets populated client side (via java script) with a set of ids -- we'll call this page 1. Server side, I am populating a variable with the ids and passing it through a query string to another page -- we'll call it page 2. Now, I have a previous button on page2 which allows me to go to page 1. I'm trying to figure out how to repopulate the listbox on page 1 with the values previously selected. I was thinking of just storing the set of ids in a session variable and using it client side to repopulate the list box. Can anyone advise on how to access a session variable client side?[code]...

View 1 Replies

Retrieving Session Variable Client Side

Jun 8, 2011

Currently, in my web application I have a listbox that gets populated client side (via java script) with a set of ids -- we'll call this page 1. Server side, I am populating a variable with the ids and passing it through a query string to another page -- we'll call it page 2. Now, I have a previous button on page2 which allows me to go to page 1. I'm trying to figure out how to repopulate the listbox on page 1 with the values previously selected. I was thinking of just storing the set of ids in a session variable and using it client side to repopulate the list box. Can anyone advise on how to access a session variable client side? Here's some snippets of my code...

[Code]...

View 3 Replies

C# - Asp.net Ajax Client Side Freamwork Failed To Load?

Dec 27, 2011

Any one have an idea about this error? asp.net ajax client side framework failed to load I am using Vb.net and I'm trying to use timer control.

View 1 Replies

C# - Passing Variable From VB Function To Client Side Javascript

Jun 15, 2012

i am using this Page.ClientScript.RegisterStartupScript() to call a javascript function from vb code behind , and this works fine with me My question is how can i send variables from the code behind to the javascript function here is what i have tried so far :

[Code]...

View 2 Replies







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