AdaSockets

码农软件 · 软件分类 · 网络工具包 · 2019-08-31 10:59:12

软件介绍

AdaSockets 是一个 Ada 95 的 socket 编程开发包,支持单播和多播套接字,使用面向对象结构来简化套接字操作。

示例代码:

with Ada.Command_Line; use Ada.Command_Line;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Text_IO; use Ada.Text_IO;
with Sockets.Stream_IO; use Sockets, Sockets.Stream_IO;

procedure Stream_Sender is

   -- Usage: stream_sender remotehost remoteport
   -- Example: stream_sender localhost 5000

   Outgoing_Socket : Socket_FD;
   Stream : aliased Socket_Stream_Type;
   Line : String (1 .. 200);
   Last : Natural;

begin
   if Argument_Count /= 2 then
      Raise_Exception
        (Constraint_Error'Identity,
         "Usage: " & Command_Name & " remotehost remoteport");
   end if;

   Socket (Outgoing_Socket, PF_INET, SOCK_STREAM);
   Connect (Outgoing_Socket, Argument (1), Positive'Value (Argument (2)));
   Initialize (Stream, Outgoing_Socket);

   loop
      Put ("Type a string> ");
      Flush;
      Get_Line (Line, Last);
      String'Output (Stream'Access, Line (Line'First .. Last));
   end loop;

exception
   when End_Error => null;
end Stream_Sender;

本文地址:https://www.codercto.com/soft/d/13560.html

迎接互联网的明天

迎接互联网的明天

邹静 / 电子工业 / 2011-6 / 55.00元

《迎接互联网的明天-玩转3D Web(附盘)》,全书共5章,第1章主要阐述了国内外空前繁荣的3D互联网技术领域,以及这些领域透射出来的潜在商机;第2章主要用当下比较流行的Flash编程语言ActionScript 3,来向大家介绍面向对象编程语言的思想概念,以及一些3D渲染技术的入门知识;第3章注重建模知识的运用,主要运用WireFusion和3ds Max来制作3D网页;第4章主要介绍3D游戏编......一起来看看 《迎接互联网的明天》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码