VS 2008 Socket Connection For Realtime Data?

Feb 28, 2011

i need a little advice/help here. There is a particular scenario that is coming up and I am clueless as to how to go about it."I will soon have a lease line through which I will get realtime stock market data. This data will be available every second and it will contain prices of stocks. Now assume I am able to get that data on my local computer. How can I transmit data so that users can get that data through my software.

For e.g. assume it's 11 AM. Now if you select a stock e.g. Google, then my program should fetch data for google till 11 AM and also show new data every second or so with minimum lag. Something like a terminal where you see stock prices getting updates every second. In my case I need to get past data and show current data which get updated at short intervals."

Now I have a linux vps webserver which hosts my site. (I get one or two static ip free) What to do so that data goes from my local computer to my server and then my program (developed in vb.net) is able to get it and show it to end user. This whole system should such that its fast (real-time) and delay is minimum.

View 6 Replies


ADVERTISEMENT

Dont Get Any Data From Socket When Data Should Be There And No Exeptions Raised, Connection Is Open. Using DataAvailable To Wait For Data

Mar 24, 2011

I have a problem reading data from an RFID-reader. I connect to the reader by tcp and wait for DataAvailable to be true, then reading the data until I got a end of data character. Then I just go back and waiting for a new DataAvailable. This is done in a own thread for the function.

There seems to be some kind of timeout, If I don't got any data in a couple of minutes, then it just sits there in the do/loop waiting for DataAvailable. I hold the card to the RFID reader, it beeps, but there is no data available. I don't get any exeptions, and the information says that the clientsocket is still connected. Are there anything more I can check?

If I put the card to the reader in a minute-interval it seems as this will never occur. So 2-3 minutes idle:ing seems to do this.

Here are my code to read data from the socket, I have taken away some irrelevant code:

Sub test(ByVal ip As String, ByVal port As Integer)
' this sub is meant to run forever

[CODE]......................

View 1 Replies

Receive Data From Multicast LAN IP With Socket Connection?

Mar 24, 2012

I converted some codes from python to VB 2010. My aim is sending query data to multicast IP and get the response. My query data receiving from device which is connected to my LAN. Also the device responding my query and my PC receiving the responce but at this point the VB program freezing.getting response data and printing to console without freezing.

This is the code list;

Imports System.Net
Imports System.Net.Sockets
Imports System.Text

[code]....

Here is the Wire Shark (Network Protocol Anlyzer) screen shots; My computer IP is : 192.168.0.11 and device's IP is : 192.168.0.10.

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

VS 2008 System.Net.Socket Connection Status?

Dec 8, 2009

im trying to detect if the connection is still active upon trying to send or receive anything. Now I have checks in place if it's connected then it will send or receive however... it's saying it's connected when it is not connected... and therefore my program tries to send and receive and errors.

I am determining if it is ok to send and receive by using the Socket.Poll(-1, SelectMode.SelectWrite)

if it's true then im connected and data can be passed..This seems to always be true until I send something and it fails..How can I catch the socket not being connected before it fails upon sending or receiving?

View 6 Replies

[2008] Error - Unable To Read Data From The Transport Connection: The Connection Was Closed

Mar 15, 2009

I have a simple scraper. It works on some websites, but on some there is this Error:

Quote:

IOException was unhandled Unable to read data from the transport connection: The connection was closed

It is occuring at "Dim htmlresults As String = Urlcontents.ReadToEnd()".

'Create the HttpWebRequest object
Dim req As HttpWebRequest = WebRequest.Create(URL)
'Set the timeout to 1 second (or 1,000 milliseconds)
req.Timeout = 10000

[code]....

View 2 Replies

C# - Set Up A Web Socket Connection In .NET

Jun 22, 2011

I have my index.aspx file:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="index.aspx.vb" Inherits="Web_Socket.index" %>
<!DOCTYPE html>
<html>

[Code]....

so now my question is how do i connect the WebSocketServer.cs to the index.aspx ?

As a start, all I'm trying to accomplish is just to get the Web Sockets working, and have the connection established, which then will alert("Stock Ticker Connection open ...");

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

Communications :: Socket Connection Error

Aug 1, 2008

I'm working on an application that communicates to torque controllers on the factor floor. The user inputs an IP address and a port and clicks the btnConnect button to make the initial connection. Once that completes a KeepAlive message must be sent periodically to maintain communication with the torque controller. The initial connection works very well but a socket error (see below) grinds everything to a halt when the KeepAlive message is sent. I would appreiciate any ideas the readers may have on the root cause. I'm quite confused because basically the same code is use for both the initial connection and then the KeepAlive messages. I have pasted some of the code as well below.

[code]...

View 1 Replies

Socket Connection - Calling WriteData Sub

Nov 22, 2010

I am trying to make a class that will allow me to open a socket, leave it open and then write to it when needed. I wrote the following code but whenever I call the writeData sub I get an error with the network stream. Its says it is not an open connection. I call the connection sub first and then the writeData sub.

Imports System.Net.Sockets
Imports
System.Text
Public
Class vizSocketConnect
[Code] .....

View 4 Replies

Converting Socket Connection From Python To VB 2010?

Mar 23, 2012

I have codes which is written with python. I am not good with python and i want to convert this python codes to VB 2010.This python function searching local network and finding my LG TV's local IP adress. I want to find my TV's local IP with VB 2010.

[Code]...

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

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

Use The Code From Microsoft For An Async Socket Connection?

Mar 26, 2010

I am trying to use the code from Microsoft for an Async Socket connection. It appears the listener runs in the main thread locking the GUI. I am new at both socket connections and multi-threading all at the same time. Having a hard time getting my mind wrapped around this all at once.

[Co0de]...

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

.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

Communications :: Use A Socket Connection On Vb To Communicate With PC Without Using GSM Modem And SIM Card?

Apr 1, 2009

I would like to know can we use a socket connection on vb to communicate with PC without using GSM modem and SIM card.for example, like sendin a simple text msg to the PC and it will reply back the result back to me the result.

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

VS 2008 - Realtime Microphone Playback (Like Amplifier)

Mar 13, 2011

I need to make an application that plays the microphone line in the same time I speak to it, somewhat like an amplifier, so I can talk to the microphone without recording and my speakers play that sound at the same time! Its pretty difficult for me because I am really new at this type of applications and off course I don't have any idea about microphone line in volume control coding too!

View 2 Replies

VS 2008 : Draw Realtime Line Picturebox?

Apr 30, 2009

how to draw in realtime? I have this code in a timer:

Dim picBoxWidth As Integer = PictureBox1.Size.Width
Dim picBoxHeight As Integer = PictureBox1.Size.Height
Dim halfWidth As Integer = PictureBox1.Size.Width / 2
Dim halfHeight As Integer = PictureBox1.Size.Height / 2

[code]....

this would draw a graph, and when x has counted to 1000 it should start again. The center cross is written, but no graph.

View 5 Replies

VS 2008 Ways To Enhance Comobox Width In Realtime?

Oct 10, 2009

I have the following problem: I have a combobox in my application. Sometimes the data inside are too wide to be displayed (see here). Is it possible to use tooltiptext to display the whole data line if the user stands on this line? Or perhaps sending the whole data to a right-click context menu? If so - how?

View 1 Replies

Reading Data From A Socket (as Bytes) And Storing Data In A String?

Nov 29, 2009

I am reading data from a socket (as bytes) and storing this data in a string. Then later i need to access specific bytes within the string and do some math with them. However the bytes that I read back from the string are not what I am expecting.

[Code]...

View 2 Replies

VS 2008 - Choose Data Source - User To Easily Create A Connection To Any Installed Data Types They Have Installed

Jun 1, 2011

I have been trying for days now how to create a process to the user to easily create a connection to any installed data types they have installed. I have found an example right inside vb2008. I never use this because I code my own connections, but this would be real nice if I could include it or duplicate it.

View 1 Replies

VS 2008 Select Data From 2 Tables (without SQL Connection)?

May 5, 2010

My project is a standalone application with lots data retrieval and sometimes data update.No SQL server or connection provided)Here is sample code

Dim objDS As New DataSet("Quesetion")
Dim dtBook As DataTable = objDS.Tables.Add("Book")
Dim dtChapter As DataTable = objDS.Tables.Add("Chpater")

[code].....

View 3 Replies

VS 2008 : Strip Out The Data Source From The Connection String?

Aug 28, 2010

How do I strip out the data source from the connection string so that I only have the directory path and file name.

My connection string is thus:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and SettingsMartinMy DocumentsVisual Studio 2008ProjectsRestelRestel IIRestel IIRestel.mdb

View 2 Replies

VS 2008 Unable To Read Data From Transport Connection

Nov 23, 2010

I am trying to send messages from my application to a yahoo account and I am getting the following error:failure sending mail..Unable to read data from the transport connection: net_io_connectionclosed.Is this because of the LAN and work or something else/ [code]after the line mailobj.send executes it stalls for a while and then the application ends.I checked all the parameters and they seem correct

View 4 Replies

Data Receiving With Socket?

Sep 27, 2011

i am working on 3rd party chat software, when ever i send data to server i get incorrect buffersize of data. like when i convert that data to hex to matching header for splitting data i got huge lengths data

in the above textbox of image i have got some 0000000000000000000.... with the hex data, how can i get only only original data. The code i have used to receive data is

[Code]...

View 1 Replies

Send Data With Socket?

Feb 21, 2011

I want to connect with a barcode printer and sendhim some specific characters and take back anything they send to me

[code]...

View 2 Replies

VS 2008 - Printing Raw Data By Simply Opening A Connection To Printer's IP

May 14, 2009

I have made a PRN file using the "Print to file" option, and now I want to make a VB.net application that will print it directly to a TCP/IP printer which is not currently installed on the computer. Is it possible to achieve this by simply opening a connection to the printer's IP and sending all the bytes of the PRN file to it, or is it more complex than that?

View 3 Replies

BitConverter - Sending Data Across TCP Socket

Apr 9, 2010

Given the following information
Public Enum Request As Byte
None = 0
Identity = 1
License = 2
End Enum
Protected mType As Communication.Request
mType = Communication.Request.Identity
Debug.Print (BitConverter.GetBytes(mType).Length.tostring)
2

Why does bitconverter report that mType is a length of 2. I would have thought that passing a Byte into BitConverter.GetBytes would just return the Byte. I mean it's no big deal because it's only sending a very small block of data across a TCP Socket, but I'm just intrigued why it thinks it's 2 bytes.

View 1 Replies







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