Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-07

socket example

9 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Harald Houppermans
to Harald Houppermans
MySocket := socket( AF_INET, SOCK_DGRAM, PF_INET );

This call fails with socket error 10043

I am guessing protocol not supported ?

Do I need to start winsock first or something...

I would like to work with the udp protocol.

Reply by email

Harald Houppermans
to Harald Houppermans

What my program would need is:

When a packet is received:

source address and source port

When sending a packet...

supplieing a

dest address and dest port.

The last could be done with connect.

How to do the first is now the question...

Maybe with recv... but the doc says it needs to be in a connected state?

Also maybe with getpeername

This seems to be a weird way of working with datagrams...

Reply by email