Variables - Created An Application That Communicates Via System.net.socket

Nov 9, 2011

I Have a problem with vb.net. Basically I created an application that communicates via system.net.socket. on the server side of client connect, and a thread checks whether there are new incoming data. if there are data, puts them in a few tread declared variables, together with the "index" of the server. once this is done through "INVOKE" calls a routine that checks the incoming data andperforms an operation based on the data. I'll see what I do not work

Dim returndata As String = System.Text.Encoding.ASCII.GetString(data)

TextBox1.Text = ("DATA : " & returndata & "Socketindex =" & socketindex.ToString & " Index=" & index.ToString)

But that does not appear in the texbox, appears only "returndata", the rest c 'is same thing with the messagebox, individually, can display a messagebox with variable,but when I try to make a messagebox that displays them together, the texbox same thing!

And the same thing if I want to compare them with each other, for example

if index
= 0 then msgbox ("OK")

It does not work ...

View 2 Replies


ADVERTISEMENT

Event Type Clr20r3 P3 4a5c12c0 System.net.sockets.socket Exception And Application Crash On Some System While Running Well On Others

Aug 3, 2009

Event type clr20r3 p3 4a5c12c0 system.net.sockets.socket Exception and Application crash on some system. while running well on others. i go thorugh many forms and search a lot on google but not able to resolve the issue.

[Code]...

View 1 Replies

Write An Application That Communicates With A Digi Watchport/D Sensor?

Jul 18, 2009

I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...

Option Explicit On
Option Strict On
Imports System.IO.Ports
Public Class Form1

[Code]...

Every time when i click the button, I get the timeout exception error message.

View 1 Replies

Create A Socket Created With Programming?

Mar 16, 2010

How can I create a socket created with programming

View 1 Replies

Receive Data Through A Socket Created In Another Process

Jul 29, 2009

I am trying to implement SMPP protocol in vb. I am sucessfull in send and receiving packets using sockets. Now I would like to decentralize the functions of my program. I want to implement two programs one for sending and another for receiving using a single socket. I want to receive data through the same socket that was created in another process(i.e., the first program).

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

System.Net.Sockets.Socket?

Feb 23, 2011

I have a chat program using System.Net.Sockets.Socket that works perfectly over LAN.My question is - will this same program work over the net with little or no modification and if so do i provide the client with the IP of my machine or of my router and use port forwardin

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

Variables For System Drive (most Commonly 'C') And System Directory

Jul 15, 2010

What are the variables for The system drive (most commonly "C:") and system directory (Most commonly "C:WINDOWS")

View 4 Replies

System.Net.Sockets.Socket.BeginReceive And StateObject?

Sep 15, 2009

The MSDN Documentation in question can be found here:[URL].. It offers the following code snippet example:

[Code]...

View 2 Replies

TCP / IP Chat Program - System Socket Class?

Jul 15, 2009

I wrote a server for a tcp/ip chat program using the system.net.sockets class. When I run the program and the client tries to connect to it, there's an error and it won't work. I am positive that the issue isn't with the client, as I have made a connection with the client before.

Imports System.Net
Imports System.Net.Sockets
Imports System.IO
Public Class Form1
Dim server As New TcpListener(IPAddress.Any, 60)
Dim client As New TcpClient
[Code] .....

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

Determine If System.Net.Sockets.Socket Has Outgoing Data Not Read?

Sep 18, 2009

Is there a way to determine if a System.Net.Sockets.Socket has sent data that has not been received/read by a specified remote endpoint with a connectionless protocol?It never hurts to try.

View 1 Replies

2005 - Discard The Contents Of A System.Net.Sockets.Socket Send Buffer Using TheSocket.IOControl(IOControlCode.Flush

Jun 10, 2012

I'm attempting to discard the contents of a System.Net.Sockets.Socket send buffer using theSocket.IOControl(IOControlCode.Flush, .... Does anybody know whether VB.NET supports this command? I've tried supplying 'Nothing' and 'Nothing' for both required parameters, also empty and populated byte arrays in combination with 'Nothing' for both required parameters, but I consistently get an 'Invalid argument' exception. I've tried a web search for an answer, but the only mention I've found was a question asked about 8 years ago, with still no answer.

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

Creating Something That Communicates To A Server?

Oct 12, 2010

I'm not sure if this is where I should post as to this is my first time on these forums. But, I am creating something that communicates to a server, and on the server part it's giving me troubles, and I am confused on how to fix it. I did rip the code off some where online.The line that I am getting the error "Warning2'Public Sub New(port As Integer)' is obsolete: 'This method has been deprecated. Please use TcpListener(IPAddress localaddr, int port) instead.[URL].. on is this line:

Dim tcpListener As New TcpListener(portNumber)
Imports System.Net.Sockets
Imports System.Text
Module Module1

[Code]...

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

Server / Service That Communicates With Multiple PCs

Feb 24, 2012

I am hoping to get some advice on a project that I am wanting to work on. I have never done a web service/windows service or anything along the lines of what I am thinking so I would like some advice from some more experienced developers.I will be using VS2008 and VB.NET. My company currently mostly works in .NET 2.0 for our commercial application, but since this will be used mostly in house I would be able to use .NET 3.5 if suggested (am just not overly familiar with the additional features in .NET 3.5).What I would like is to have a server/service that communicates with multiple PCs. I want to create an application/web page (not familiar with web development so would probably start out as a winform app and possibly move to a web app to consume the service) that would query the web service/remoting service/whatever to retrieve information from each of the PCs (track the version of the application that is running, retrieve log files, push an update program to the PC (to be run manually)).

Not being too familiar with this type of scenario I was thinking something to the effect of:Each PC run a Windows Service that monitored the local PC. When something changes (software update installed?), tell the web service that the new version is installed.A service (web service? remoting server? other?) running on a PC that would be the interface to the windows service (not sure how the web service would talk to the Windows service without the Windows service initiating, though, unless it is also running a server) on the individual PCs. The service could request an update from the PCs (get the software version, request a file). The service would also be able to push an update program to the PCs to be run manually.

View 2 Replies

Write An App That Communicates With A Server That Was Written In C?

Aug 23, 2009

I am trying to write an app that communicates with a server that was written in C. Not knowing C at all so i have some problems understanding the messages in c-style struct format that i need to send from the vb.net side.

[Code]...

View 3 Replies

Ws2_32.dll Hooking - App That Communicates With A Server

Dec 19, 2008

Basically, I have an app that communicates with a server. I need a way to monitor all the sent and received packets that are being transmitted through the app. I've been killing myself the past two days trying to figure a way to hook into ws2_32.dll to monitor these packets but I can't find a way!

View 2 Replies

VS 2008 Socket Application - Transfer Packets From The PC To The Mobile Phone

Nov 2, 2009

i try to transfer packets from the PC to the Mobile phone~ my PC is act as a Server and Mobile as a Client. My Mobile is successfully connect to my PC, but when i try to pass a packets from Mobile, it went failed without any error. The Server didn't receive any packets from Mobile. i had test my code on PC to PC and it's work fine. Anyone have this kind of experience?

View 3 Replies

Created System And Would Like To Connect It To LAN

Sep 2, 2011

my system is already working. I used VB.net and mysql. i used ODBC DSN to connect .net to mysql. however i would like my system to run in a Local Area Connection.

View 3 Replies

VS 2008 Make A Program That Communicates With Other Programs?

Jun 5, 2009

I want to make a program that can communicate with other programs, Like a tcpserver/client.But i don't know where to start. I want the user to be able to submit several urls to pictures on the internet and for other users to be able to view those pictures. How can I do this?

View 1 Replies

How Is A Strong Authentication System Created

Mar 6, 2012

I am trying to make a strong (or even medium-security) based authentication. How this would work is simply by storing a username/code on web (using dropbox perhaps) then using those codes to pass on to friends to use. This way if you remove that code online,that person will no longer be able to access that program. As far as I know, it is quite simple to save the number of uses, or username and pass on a text file to save on their file or registry things can be done but that is only 1 computer based. That is a very easily crackable security and is not worth it.As far as I have know you need to create a new main form where the code/ id/ username/password/onetimelogin will be asked. If it is correct, form2.show if not then "exit". The codes are stores on a text file on dropbox.com like websites, then the link to the textfile is obtained.

View 3 Replies

Calling System Environment Variables?

Apr 13, 2011

Below is the code i am using to read and update the system environmental variable. This code is working fine when i am executing .exe on Local Machine. I am getting problem when i try to access this .exe from Browser(using citrix i am doing this) and invoke. when i invoke from browser its going to catch block and displaying MsgBox("Unable to Create LDAP Key.

[Code]...

View 8 Replies

Windows System Variables In Strings

Jun 6, 2009

How would I use a system variable such as %userprofile% in a string in VB.net? I have this in my program, but calling the system variable directly isn't working

[Code]...

View 6 Replies

VS 2008 Sharing Variables - Private Sub Could Use The Variable Created On Private Sub

Jul 23, 2010

if for example i have two private sub I declared a local variable on private sub a... is there a way that private sub b could use the variable created on private sub a? Im asking because im in a problem in my app were using global variable is not an option to make the long story short

View 5 Replies

VS 2008 - System Variables / Editing Registry Value

Apr 21, 2010

Can VB 2008 use the system variable %1 that contains what filename a program was opened with? I am making a new app that when you click a .exe file and select the right option, it will edit the registry but I need to be able to keep the filename that I right clicked on so that I know what registry value to edit, is this possible?

View 1 Replies

Created A System Whereby The Database Is Connected To Using The Preset Tools Available?

Jul 2, 2009

I have a connection to an access database, I have used the data sources tool provided because in this particular instance I don't want to do much with it other than display the records (which I can do) and edit them (which I'm haveing some trouble with).I have created a system whereby the database is connected to using the preset tools available like; BindingSource, TableAdapter, BindingNavigator etc.

I also have a button for edit. This doesn't work and I was wondering if anyone could help me with this? I can't really provide any code for this, because I didn't code the connection by hand and the code I have been attempting to use for editting the records in the database doesn't even sort of work.

View 1 Replies

Zombie Object - Communicates With OPC Server - Value Of A Certain OPC Item Changes - Logs All OPC Items To A Database

Jul 13, 2010

In my application, I've built an object that communicates with an OPC server and whenever the value of a certain OPC item changes, it logs all the OPC items to a database. This all works beautifully. However, I'm having a problem with disposing of the instances of this class. Whenever I want to remove an instance of this class from the application, I'm dereferencing the object (objDevice = Nothing) and letting GC take care of the rest. I've inserted breakpoints and am monitoring to ensure that the object is dereferenced (it is).

Problem is, even after the object has been dereferenced and is CONFIRMED to be equal to Nothing, the object is still logging data to the database. I'm still trying to get a handle on disposing of objects properly, but most everything I read tells me to dereference and let Garbage Collection take over.

View 5 Replies







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