-
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

Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR
$96.60

NEW DELL TRUSTED PLATFORM MODULE TPM 2.0 POWEREDGE T430 T630 G13 SERVERS K98XH
$225.00

Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working
$149.99

Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric
$174.99

Dell PowerEdge FX2 FX2s Server 10GbE CMC Blade Enclosure Chassis
$274.99

Dell PowerEdge FX2 FX2s Server 10GbE CMC Blade Empty Chassis XJ6VP
$149.99

HPE Synergy 480 Gen10 Blade Server BAREBONES NO CPU, RAM OR HDD 🚚
$140.00

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER
$1499.97

NEW Cisco UCSB-5108-AC2 Blade Server Chassis 8 Slot 6RU Chassis 4 X PSU - DW
$599.40

ASUS Blade Server LAN Web Remote Management KVM Module Chip IPMI 2.0 ASMB9-iKVM
$49.99