Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move examples out of source directory

Examples are no longer built by default.
  • Loading branch information...
commit 5daf691baade6265fe3ab94bc16fdf8e0e596bf5 1 parent edef854
Michael Santos authored
4 README.md
Source Rendered
@@ -89,6 +89,10 @@ capabilities:
89 89
90 90 ## EXAMPLES
91 91
  92 +To build the examples:
  93 +
  94 + erlc -o ebin examples/*
  95 +
92 96 ### Simple echo server
93 97
94 98 $ erl -pa ebin
4 ebin/procket.app
@@ -7,9 +7,7 @@
7 7 procket_ioctl,
8 8 packet,
9 9 bpf,
10   - procket_mktmp,
11   - icmp,
12   - echo
  10 + procket_mktmp
13 11 ]},
14 12 {registered, []},
15 13 {applications, [
14 src/echo.erl → examples/echo.erl
... ... @@ -1,21 +1,21 @@
1   -%% Copyright (c) 2010, Michael Santos <michael.santos@gmail.com>
  1 +%% Copyright (c) 2010-2011, Michael Santos <michael.santos@gmail.com>
2 2 %% All rights reserved.
3   -%%
  3 +%%
4 4 %% Redistribution and use in source and binary forms, with or without
5 5 %% modification, are permitted provided that the following conditions
6 6 %% are met:
7   -%%
  7 +%%
8 8 %% Redistributions of source code must retain the above copyright
9 9 %% notice, this list of conditions and the following disclaimer.
10   -%%
  10 +%%
11 11 %% Redistributions in binary form must reproduce the above copyright
12 12 %% notice, this list of conditions and the following disclaimer in the
13 13 %% documentation and/or other materials provided with the distribution.
14   -%%
  14 +%%
15 15 %% Neither the name of the author nor the names of its contributors
16 16 %% may be used to endorse or promote products derived from this software
17 17 %% without specific prior written permission.
18   -%%
  18 +%%
19 19 %% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 20 %% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 21 %% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -73,5 +73,3 @@ recv(S) ->
73 73 Error ->
74 74 error_logger:error_report({recv, Error})
75 75 end.
76   -
77   -
3  src/icmp.erl → examples/icmp.erl
... ... @@ -1,4 +1,4 @@
1   -%% Copyright (c) 2010, Michael Santos <michael.santos@gmail.com>
  1 +%% Copyright (c) 2010-2011, Michael Santos <michael.santos@gmail.com>
2 2 %% All rights reserved.
3 3 %%
4 4 %% Redistribution and use in source and binary forms, with or without
@@ -125,4 +125,3 @@ icmp(<<?ICMP_ECHO_REPLY:8, 0:8, Checksum:16, Id:16, Sequence:16, Payload/binary>
125 125
126 126 sleep(N,S) when N =:= S + 1 -> ok;
127 127 sleep(_,_) -> timer:sleep(1000).
128   -

0 comments on commit 5daf691

Please sign in to comment.
Something went wrong with that request. Please try again.