How can I create a new socket in /dev?

Marc

I want to create a new socket file in /dev. Does the way to get it is adding a new rule to udev?

ish
  • The usual way to create a Unix domain or TCP socket is programatically, via the mknod or socket system calls. The mknod command will not allow you to create a socket.

From the command line, use the socket package

  • If you wish to create a Unix/TCP socket from the command-line, try the socket command from the socket package (install it first). Summarizing its man page description:

    Socket creates an Internet domain TCP or a UNIX domain stream socket and connects it to stdin and stdout.

Examples of socket usage (from man page)

  1. socket -v coma.cs.tu-berlin.de nntp

    connects to the nntp port (port 119) of coma.cs.tu-berlin.de (130.149.28.10).

  2. socket -sl 3425

    creates a server socket on port 3425 on the local host and waits for a connection. After a connection has been closed, a new connection is accepted.

  3. socket -wslqvp "echo Socket! " 1938

    creates a server socket on port 1938 on the local host and waits for a connection. When a connection is accepted, the string "Socket!" is written to the socket. No data is read from the socket and written to the finger program. The connection is closed when an end-of-file condition at the standard output of the program occurs. Then a new connection is accepted.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I create a new socket in /dev?

From Dev

How can I properly create /dev/dvd?

From Dev

How can I properly create /dev/dvd?

From Dev

How can I create a new instance of ImmutableDictionary?

From Dev

How can I create new shell commands?

From Dev

How can I use fdisk to create a ntfs partition on /dev/sdx?

From Dev

How can I create a /dev/null-like "blackhole" directory?

From Dev

How can I create a two-way SSL socket in Ruby

From Dev

How can I create a new Symfony project with the new directory structure?

From Dev

How can I create a new Azure CDN using C#?

From Dev

How can i create a new user account in XMPPFrameWork in ios

From Dev

How can I create a new Ubuntu desktop environment/window manager?

From Dev

rhomobile how can i create android keystore with new credentials on linux

From Dev

How can I create a new Role in SharePoint 2013?

From Dev

How can i create a New Activity from IntelliJ?

From Dev

How can I destroy fineuploader instance and create a new using jquery?

From Dev

How can I create a new blank file in an occupied directory?

From Dev

How can I create a CGRect with a new origin but utilizing the existing size?

From Dev

How can I create a new file with a simple way in spacemacs?

From Dev

How can I create a new remote branch by a commit with no changes?

From Dev

How can I create a new exception class and throw it

From Dev

How can I edit/create new launcher items in Unity by hand?

From Dev

How can I create a new Graph Editor in Maya using Python?

From Dev

How can I create a new form for a SharePoint list in PowerShell?

From Dev

How can I implement a 'create' action without 'new' action

From Dev

How can I create a new line in JTextField to type in?

From Dev

How can I create a new project with tasks in Asana using Python?

From Dev

How can I create a new thread AddressOf a function with parameters in VB?

From Dev

How can I create new window with same state as parent window?

Related Related

  1. 1

    How can I create a new socket in /dev?

  2. 2

    How can I properly create /dev/dvd?

  3. 3

    How can I properly create /dev/dvd?

  4. 4

    How can I create a new instance of ImmutableDictionary?

  5. 5

    How can I create new shell commands?

  6. 6

    How can I use fdisk to create a ntfs partition on /dev/sdx?

  7. 7

    How can I create a /dev/null-like "blackhole" directory?

  8. 8

    How can I create a two-way SSL socket in Ruby

  9. 9

    How can I create a new Symfony project with the new directory structure?

  10. 10

    How can I create a new Azure CDN using C#?

  11. 11

    How can i create a new user account in XMPPFrameWork in ios

  12. 12

    How can I create a new Ubuntu desktop environment/window manager?

  13. 13

    rhomobile how can i create android keystore with new credentials on linux

  14. 14

    How can I create a new Role in SharePoint 2013?

  15. 15

    How can i create a New Activity from IntelliJ?

  16. 16

    How can I destroy fineuploader instance and create a new using jquery?

  17. 17

    How can I create a new blank file in an occupied directory?

  18. 18

    How can I create a CGRect with a new origin but utilizing the existing size?

  19. 19

    How can I create a new file with a simple way in spacemacs?

  20. 20

    How can I create a new remote branch by a commit with no changes?

  21. 21

    How can I create a new exception class and throw it

  22. 22

    How can I edit/create new launcher items in Unity by hand?

  23. 23

    How can I create a new Graph Editor in Maya using Python?

  24. 24

    How can I create a new form for a SharePoint list in PowerShell?

  25. 25

    How can I implement a 'create' action without 'new' action

  26. 26

    How can I create a new line in JTextField to type in?

  27. 27

    How can I create a new project with tasks in Asana using Python?

  28. 28

    How can I create a new thread AddressOf a function with parameters in VB?

  29. 29

    How can I create new window with same state as parent window?

HotTag

Archive