Click here to Skip to main content
15,887,214 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRunning process in background Pin
mmsspp22-Dec-04 23:02
mmsspp22-Dec-04 23:02 
GeneralRe: Running process in background Pin
T Manjaly6-Jan-05 13:37
T Manjaly6-Jan-05 13:37 
GeneralMSMQ in .NET - Design question Pin
Anonymous22-Dec-04 11:48
Anonymous22-Dec-04 11:48 
GeneralPassing a .NET function pointer to COM component Pin
jimhammy22-Dec-04 4:58
jimhammy22-Dec-04 4:58 
Generalinjecting a DLL to aspnet process Pin
impeham22-Dec-04 4:31
impeham22-Dec-04 4:31 
GeneralPlugins for IE using .NET Pin
Raghu B. Gowda21-Dec-04 19:27
Raghu B. Gowda21-Dec-04 19:27 
GeneralIs it possible to open IE/Netscape browsers in Hidden Mode ... Pin
new_phoenix21-Dec-04 11:02
new_phoenix21-Dec-04 11:02 
GeneralReceiving Data Socket Client Pin
TVILLE20-Dec-04 3:03
sussTVILLE20-Dec-04 3:03 
I am new to programming of all sorts. I need a little help in finding a problem in my code. I am trying to retrieve some NEMA(text stream) data from a server by creating a socket then sending a query. The console application works but I am not receiving all of the data string from the server. I have used some other “Canned” applications that basically do the same thing and they display the entire string after I send the query. I will enclose my code. Please keep in mind that my knowledge is very, very little. Any suggestions would greatly be appreciated.
____________________________________________________________________________
Imports System.Text
Imports System.IO

Module Module1
Sub Main()
Dim bytes(8095) As Byte
Dim ipHostInfo As IPHostEntry = Dns.Resolve("www.XXXXXXX.com")
Dim ipAddress As IPAddress = ipHostInfo.AddressList(0)
Dim remoteEP As New IPEndPoint(ipAddress, XXXX)
' Create a TCP/IP socket.
Dim sender As New Socket(AddressFamily.InterNetwork, _
SocketType.Stream, ProtocolType.Tcp)
' Connect the socket to the remote endpoint. Catch any errors.
' Try
sender.Connect(remoteEP)
Console.WriteLine("Socket connected to {0}", sender.RemoteEndPoint.ToString())
' Encode the data string into a byte array.
Dim msg As Byte() = Encoding.ASCII.GetBytes("XXX vehicle ghist:X.XXX.X.XXX,000000,11/01/2004,000000,12/10/2004,eof" & vbCrLf)
' Send the data through the socket.
Dim bytesSent As String = sender.Send(msg)
' Receive the response from the remote device.
Dim bytesRec As Integer = sender.Receive(bytes)
Console.WriteLine(Encoding.ASCII.GetString(bytes, 0, bytesRec))
sender.Shutdown(SocketShutdown.Both)
sender.Close()
Console.Read()
End Sub
End Module

Generalvisual studio 2005 beta / visual studio.net 2003 Pin
Aviv Halperin19-Dec-04 20:38
Aviv Halperin19-Dec-04 20:38 
GeneralRe: visual studio 2005 beta / visual studio.net 2003 Pin
zagzagzag27-Dec-04 2:46
zagzagzag27-Dec-04 2:46 
GeneralRe: visual studio 2005 beta / visual studio.net 2003 Pin
Aviv Halperin27-Dec-04 5:18
Aviv Halperin27-Dec-04 5:18 
GeneralRe: visual studio 2005 beta / visual studio.net 2003 Pin
benjymous5-Jan-05 5:57
benjymous5-Jan-05 5:57 
GeneralBasics of .Net Pin
Neelesh K J Jain19-Dec-04 18:13
Neelesh K J Jain19-Dec-04 18:13 
GeneralRe: Basics of .Net Pin
DavidNohejl22-Dec-04 6:51
DavidNohejl22-Dec-04 6:51 
GeneralRe: Basics of .Net Pin
Peter Weyzen23-Dec-04 8:49
Peter Weyzen23-Dec-04 8:49 
GeneralRe: Basics of .Net Pin
DavidNohejl23-Dec-04 9:10
DavidNohejl23-Dec-04 9:10 
GeneralRe: Basics of .Net Pin
DavidNohejl23-Dec-04 9:11
DavidNohejl23-Dec-04 9:11 
GeneralArabic support in PDA SQLCE Pin
Isaac_cm19-Dec-04 0:28
Isaac_cm19-Dec-04 0:28 
GeneralDouble.NaN & Double.PositiveInfinity Pin
Anonymous17-Dec-04 1:55
Anonymous17-Dec-04 1:55 
GeneralRe: Double.NaN & Double.PositiveInfinity Pin
Richard Deeming17-Dec-04 7:00
mveRichard Deeming17-Dec-04 7:00 
GeneralChanging Crystal report display dynamically Pin
Sujith_Manuel16-Dec-04 18:45
Sujith_Manuel16-Dec-04 18:45 
GeneralFilter Drivers Pin
mmsspp15-Dec-04 18:18
mmsspp15-Dec-04 18:18 
GeneralCompac Framework Pin
dcudev.lcr15-Dec-04 8:38
dcudev.lcr15-Dec-04 8:38 
GeneralNo touch deployment bug Pin
itair15-Dec-04 2:32
itair15-Dec-04 2:32 
GeneralRe: No touch deployment bug Pin
itair15-Dec-04 18:26
itair15-Dec-04 18:26 

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.