Click here to Skip to main content
16,008,183 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Displaying how many users are currently logged into a web application - Please help Pin
Christian Graus17-Mar-08 13:25
protectorChristian Graus17-Mar-08 13:25 
GeneralRe: Displaying how many users are currently logged into a web application - Please help [modified] Pin
nlarson1117-Mar-08 16:10
nlarson1117-Mar-08 16:10 
GeneralThere is no row at position 0 Pin
AAGTHosting17-Mar-08 7:03
AAGTHosting17-Mar-08 7:03 
GeneralRe: There is no row at position 0 Pin
Dave Kreskowiak18-Mar-08 3:03
mveDave Kreskowiak18-Mar-08 3:03 
GeneralDropdown list remains visible Pin
cstrader23217-Mar-08 5:07
cstrader23217-Mar-08 5:07 
GeneralRe: Dropdown list remains visible Pin
Dave Kreskowiak18-Mar-08 2:56
mveDave Kreskowiak18-Mar-08 2:56 
Generalnetwork sockets Pin
Cory Kimble17-Mar-08 4:29
Cory Kimble17-Mar-08 4:29 
GeneralRe: network sockets Pin
Dave Kreskowiak18-Mar-08 3:28
mveDave Kreskowiak18-Mar-08 3:28 
Well, both examples you posted are missing things. The first doesn't connection to the target at all. The second connects, but does retrieve the underlying stream. So, you combine the two and you get something like this:
Dim tcpClient As New System.Net.Sockets.TcpClient()
tcpClient.Connect("127.0.0.1", 8000)
 
Dim networkStream As NetworkStream = tcpClient.GetStream()
If networkStream.CanWrite And networkStream.CanRead Then
 
Dim sendBytes() As Byte = Encoding.ASCII.GetBytes("Is anybody there")
networkStream.Write(sendBytes, 0, sendBytes.Length)
 
Dim bytes(tcpClient.ReceiveBufferSize) As Byte
networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))

Dim returndata As String = Encoding.ASCII.GetString(bytes)




A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: network sockets Pin
Cory Kimble18-Mar-08 4:34
Cory Kimble18-Mar-08 4:34 
QuestionDrawing in user control Pin
N!ck17-Mar-08 4:03
N!ck17-Mar-08 4:03 
GeneralRe: Drawing in user control Pin
Dave Kreskowiak17-Mar-08 7:44
mveDave Kreskowiak17-Mar-08 7:44 
GeneralRe: Drawing in user control Pin
Christian Graus17-Mar-08 9:21
protectorChristian Graus17-Mar-08 9:21 
GeneralTo get the snap shot of other machine Pin
sjs4u17-Mar-08 2:30
sjs4u17-Mar-08 2:30 
GeneralRe: To get the snap shot of other machine Pin
Dave Kreskowiak17-Mar-08 7:40
mveDave Kreskowiak17-Mar-08 7:40 
GeneralRe: To get the snap shot of other machine Pin
Christian Graus17-Mar-08 9:22
protectorChristian Graus17-Mar-08 9:22 
QuestionMSN Messenger Live Contacts Lits Pin
dunca_roo17-Mar-08 2:22
dunca_roo17-Mar-08 2:22 
GeneralRe: MSN Messenger Live Contacts Lits Pin
Dave Kreskowiak17-Mar-08 7:42
mveDave Kreskowiak17-Mar-08 7:42 
GeneralDynamically load the exe and run Pin
sjs4u16-Mar-08 23:26
sjs4u16-Mar-08 23:26 
GeneralRe: Dynamically load the exe and run Pin
Christian Graus16-Mar-08 23:48
protectorChristian Graus16-Mar-08 23:48 
AnswerRe: Dynamically load the exe and run Pin
Rajesh Anuhya17-Mar-08 0:07
professionalRajesh Anuhya17-Mar-08 0:07 
GeneralRe: Dynamically load the exe and run Pin
sjs4u17-Mar-08 0:33
sjs4u17-Mar-08 0:33 
GeneralRe: Dynamically load the exe and run Pin
Christian Graus17-Mar-08 0:40
protectorChristian Graus17-Mar-08 0:40 
GeneralRe: Dynamically load the exe and run Pin
Rajesh Anuhya17-Mar-08 0:49
professionalRajesh Anuhya17-Mar-08 0:49 
GeneralRe: Dynamically load the exe and run Pin
sjs4u17-Mar-08 0:57
sjs4u17-Mar-08 0:57 
QuestionHash Code for an image Pin
kumarrpt16-Mar-08 23:17
kumarrpt16-Mar-08 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.