caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Bomshik Kim <bskim@ropas.kaist.ac.kr>
To: caml-list@inria.fr
Subject: [Q] About Unix Library of Ocaml
Date: Tue, 22 Feb 2000 16:29:52 +0900	[thread overview]
Message-ID: <20000222162952.02632@ropas.kaist.ac.kr> (raw)


 Hello~ 
 I Have Some Questions About Unix Library

1) Why do these exceptions occur ?

---------------------------------------------------------- 
        Objective Caml version 2.04

# open Unix ;;
# let theSocket = socket PF_INET SOCK_STREAM 0 ;;
val theSocket : Unix.file_descr = <abstr>
# let theSocket = socket PF_INET SOCK_DGRAM 0 ;;
val theSocket : Unix.file_descr = <abstr>
# let theSocket = socket PF_INET SOCK_RAW 0 ;;
Uncaught exception: Unix.Unix_error(1, "socket", "")
# let theSocket = socket PF_INET SOCK_SEQPACKET 0 ;;
Uncaught exception: Unix.Unix_error(45, "socket", "")
# 
----------------------------------------------------------

2) What is the differences of 4 socket_type ?
 Stream socket, Datagram socket, Raw socket, Sequenced packets socket

3) Error with using connection function  

 Could you let me know the error code(63)
 and why does this error occur? 

-----------------------------------------------------------
        Objective Caml version 2.04

# open Unix ;;
# let addr = inet_addr_of_string "***.***.***.***" ;;
val addr : Unix.inet_addr = <abstr>
# let socketAddr = ADDR_INET( addr , 21 ) ;;
val socketAddr : Unix.sockaddr = ADDR_INET (<abstr>, 21)
# let theSocket = socket PF_INET SOCK_STREAM 0 ;;
val theSocket : Unix.file_descr = <abstr>
# connect theSocket socketAddr ;;
Uncaught exception: Unix.Unix_error(63, "connect", "")
-----------------------------------------------------------


4) Where can I get more specific information(examples, docs, papers) 
  about ocaml library especially unix library 
  (in order to design & implement bigger network library of ocaml 
   for building web-server, web-browser etc... )

@ thank you 
-bskim@ropas.kaist.ac.kr




             reply	other threads:[~2000-02-22 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-22  7:29 Bomshik Kim [this message]
2000-02-22 12:34 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000222162952.02632@ropas.kaist.ac.kr \
    --to=bskim@ropas.kaist.ac.kr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).