LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 05-31-2005, 08:27 AM   #1
mrobertson
Member
 
Registered: May 2005
Posts: 275

Rep: Reputation: 30
live cd distro


I currently have the following server wrote 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&textstring=%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 write this program in a linux language and being that I am brand new to linux I was wondering what would be the best live cd distro to use to write a program like this. Probably something with a good text editor. Any suggestions?
 
Old 05-31-2005, 08:44 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
Something like Knoppix would be fine to do something like this. I'd suggest using Python for something like that, it's not the hardest language around and if you choose to use linux as a more permenant solution for yourself, you can do almost anything in Python and the community is massive
 
Old 05-31-2005, 08:55 AM   #3
mrobertson
Member
 
Registered: May 2005
Posts: 275

Original Poster
Rep: Reputation: 30
I do not know anything about python. Would you be able offer me any information relevant to the code that I posted and how it would be translated to python. Also is python easier than c++ or a very similar language?
 
Old 05-31-2005, 07:35 PM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
http://wiki.python.org/moin/BeginnersGuide/Overview
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Live Distro that Could be used for DEV Zandrews Linux - Newbie 1 06-14-2005 02:25 PM
best live-cd distro? questionasker Linux - Distributions 42 06-02-2005 02:25 AM
Getting a live cd distro of knoppix mrobertson Linux - Distributions 9 06-01-2005 06:22 PM
Wherever I May Roam Live Distro MSannihilator Linux - General 3 03-26-2005 06:49 PM
Live CD with more than one distro - how? Zerosurf Linux - General 3 02-24-2005 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration