Cander
Mar 11th, 2002, 11:35 AM
hey guys. I am working on a dll for Socket connections that will contain functionality for common internet communication
Here is what the break down of namespaces/class will be:
Sockets.TCP
Sockets.TCP.TCPServer
Sockets.TCP.TCPClient
Sockets.FTP
Sockets.FTP.FTPServer
Sockets.FTP.FTPClient
And so on for some otehr possible connection types.
If anyone has any ideas/code or whatever, please let me know. I am in big need of System.Net.Sockets sample code. Not much out there at the moment.
here is what little I have so far
Namespace Sockets
' All socket connection types
Namespace TCP
Imports System.Net.Sockets
' For TCP comm
Public Class TCPServer
' For TCP servers
Private m_Port As Integer
Private tcpConn As TcpClient
Public Sub Listen()
' Start Listening for incoming connections
Dim tcpListener As New TcpListener(m_Port)
tcpListener.Start()
Try
' Accept a connecting client
tcpConn = tcpListener.AcceptTcpClient()
Catch e As Exception
End Try
End Sub
Public Sub SendData(ByVal strData As String)
' Server sending to client
End Sub
Property Port() As Integer
' Port property
Get
Return m_Port
End Get
Set(ByVal Value As Integer)
m_Port = Value
End Set
End Property
End Class
End Namespace
End Namespace
Here is what the break down of namespaces/class will be:
Sockets.TCP
Sockets.TCP.TCPServer
Sockets.TCP.TCPClient
Sockets.FTP
Sockets.FTP.FTPServer
Sockets.FTP.FTPClient
And so on for some otehr possible connection types.
If anyone has any ideas/code or whatever, please let me know. I am in big need of System.Net.Sockets sample code. Not much out there at the moment.
here is what little I have so far
Namespace Sockets
' All socket connection types
Namespace TCP
Imports System.Net.Sockets
' For TCP comm
Public Class TCPServer
' For TCP servers
Private m_Port As Integer
Private tcpConn As TcpClient
Public Sub Listen()
' Start Listening for incoming connections
Dim tcpListener As New TcpListener(m_Port)
tcpListener.Start()
Try
' Accept a connecting client
tcpConn = tcpListener.AcceptTcpClient()
Catch e As Exception
End Try
End Sub
Public Sub SendData(ByVal strData As String)
' Server sending to client
End Sub
Property Port() As Integer
' Port property
Get
Return m_Port
End Get
Set(ByVal Value As Integer)
m_Port = Value
End Set
End Property
End Class
End Namespace
End Namespace