-
How to begin coding a server in knoppix
I have the following server application written in vb6:
Option Explicit
Dim sServerMsg As String
Private Sub Form_Load()
'Address must be input as a string
Dim Address As String
'Set the address equal to the web address of the pickle line camera
Address = "http://pl7cam2/operator/image_test.shtml?camNo=1&squarepixel=0&resolution= 4CIF&compression=35&color=yes&rotation=0&overlayim age=0&overlaypos=0x0&date=1&clock=1&text=1&textstr ing=%237%20Pickle%20Exit%20Camera&textcolor=white& textbackgroundcolor=black&textpos=top&duration=NaN &fps=0kkkkkkkkkkkkkkk"
'tells the browser window to display whatever is on the web page of the address
WebBrowser1.Navigate Address
'The port number is arbitrary.
' it's best to use a fairly high number
' because the low numbers are used for
' standard services: 21 for FTP, 23 for telnet,
' 80 for HTTP etc...
Winsock1(0).LocalPort = 10119
'start listening for a connection
Winsock1(0).Listen
'Define the message and show the connection in the list box
sServerMsg = "Listening to port: "
List1.AddItem (sServerMsg)
End Sub
Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
'the winsock control has to be in a closed state
' before it can do anything else. (like accept a connection)
Winsock1(Index).Close
'Let the winsock close
DoEvents
'accept the connection request
Winsock1(Index).Accept requestID
'Define the message and display it in the list box
sServerMsg = "Serving client!"
List1.AddItem (sServerMsg)
End Sub
Private Sub Winsock1_Close(Index As Integer)
'When the other end has closed the connection,
' close server end too
Winsock1(Index).Close
'to continue listening for another connection
Winsock1(Index).Listen
'show the connection in the list box
sServerMsg = "Listening to port: "
List1.AddItem (sServerMsg)
End Sub
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim strTemp As String
'Dim strTemp2 As String
Dim a As Integer
'This event fires when the process on the other end of the connection(i.e the client)
'sends data
'retreive data from socket
Winsock1(Index).GetData strTemp
'Winsock1(Index).GetData strTemp2
'The following code separates each part of the string based on the comma
'that is present in the incoming string and parses it out into its
'respective textbox
a = InStr(strTemp, ",")
txtcoilid.Text = Left(strTemp, a - 1)
'after the first parse you must refine the string as everthing after the comma and
'repeat the process throughout the entire string
strTemp = Mid(strTemp, a + 1)
a = InStr(strTemp, ",")
txtwidth.Text = Left(strTemp, a - 1)
strTemp = Mid(strTemp, a + 1)
a = InStr(strTemp, ",")
txtlinespeed.Text = Left(strTemp, a - 1)
strTemp = Mid(strTemp, a + 1)
a = InStr(strTemp, ",")
txtexitcoillength.Text = Left(strTemp, a - 1)
End Sub
I need to convert this server to a linux language and be able to run on a linux machine. Any suggestions on what language to use. Also, where in knoppix do you begin your coding and how do you get there? Also, is there a specific method for saving your code and how do you go about compiling it?. I am brand new to linux and need to get some basic information to get me started. If anyone can offer source code for translation of the above code it would be a big help.
Similar Threads
-
By mjump in forum Hardware & Booting
Replies: 1
Last Post: 11-03-2005, 11:02 AM
-
By mrobertson in forum General Support
Replies: 8
Last Post: 06-04-2005, 11:02 AM
-
By jwh7 in forum General Support
Replies: 1
Last Post: 10-13-2004, 11:06 PM
-
By pubecon in forum Customising & Remastering
Replies: 0
Last Post: 03-20-2003, 11:01 PM
-
By totalnewbie in forum General Support
Replies: 4
Last Post: 01-26-2003, 11:47 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Cisco C3850-NM-2-10G 2 Port Network Exp.Module for 3850
$18.90

Cisco Catalyst WS-C2960+24TC-S 24-Port Gigabit Managed SFP Switch
$39.99

Cisco Catalyst C9130AXI-B WiFi 6 802.11ax Wireless Access Point Brand New
$101.99

New Sealed Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Transceiver Module *US
$17.00

Cisco C3850-NM-2-10G Catalyst 3850 2 x 10GE Network Module
$21.45

Cisco Nexus N3K-C3064PQ-10GX 48P 10GbE SFP+ 4P QSFP+ Switch
$149.00

Cisco C9300-NM-2Y - Cisco Catalyst 9300 2 x 25G Network Module New
$550.00

Cisco Catalyst 3850-48F-L 48-Port UPoE Gigabit Switch NM-4-1G
$59.99

Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99

Cisco ASR 901 Series A901-12C-FT-D Aggregation Services Router 800-40055-01
$124.20