Recent

Author Topic: Socket  (Read 22117 times)

Grohlfer

  • New Member
  • *
  • Posts: 11
Re: Socket
« Reply #15 on: June 01, 2013, 09:44:48 pm »
Silvio,
After including Cthreads it now gives an exception immediately after pressing run button.
I also tried you demo files and components, but they do not compile without errors. Perhaps it is my Lazarus version fault. I'm running IDE v1.0.8 and FPC 2.6.2
Any other ideas?
Thanks,
Cesar

Grohlfer

  • New Member
  • *
  • Posts: 11
Re: Socket
« Reply #16 on: June 01, 2013, 10:02:40 pm »
Silvio,
I corrected the cthread uses clause. Now it is on the LPR file and everything compiles well.
The point is that when the program runs it should be listening to port 23 (telnet), enabling me to telnet to that port, but when I use telnet client and try to connect it comes with "connection refused" message.
I certified that there's no telnet daemon running on my server, just my application.
I'm using a MAC OS Lion machine.
Thanks,
Cesar
 %)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Socket
« Reply #17 on: June 01, 2013, 10:51:29 pm »
check your firewall, I have no experience with MACOS and the only thing I know is that is based roughly on the same design as the linux kernel so I assume that it has something along the line of the iptables so check that the port is not blocked.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Silvio Clécio

  • Guest
Re: Socket
« Reply #18 on: June 02, 2013, 12:50:09 am »
Port 1024 or lower are only accessible for root. Run your project as root.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Socket
« Reply #19 on: June 02, 2013, 05:42:42 am »
I have no experience with MACOS and the only thing I know is that is based roughly on the same design as the linux kernel so I assume that it has something along the line of the iptables so check that the port is not blocked.
Ehm OSX is Unix, so yes there is a resemblance. OSX uses a modified Mach kernel and BSD userland tools, so it feels like a regular commercial Unix (to me) - no standard bash though it is available.
They also added their own command line tools (and obviously) GUI/applications.

Not only could the firewall be the problem, on *nix you need to be root to listen on ports < 1024, so you may need to enable some privileges for your program (however that's arranged for OSX)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018