source: EcnlProtoTool/trunk/mrbgems/mruby-socket/test/sockettest.c@ 279

Last change on this file since 279 was 279, checked in by coas-nagasima, 7 years ago

ファイルを追加、更新。

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 371 bytes
Line 
1#include <stdio.h>
2
3#include "mruby.h"
4
5mrb_value
6mrb_sockettest_tmppath(mrb_state *mrb, mrb_value klass)
7{
8 return mrb_str_new_cstr(mrb, tempnam(NULL, "mruby-socket"));
9}
10
11void
12mrb_mruby_socket_gem_test(mrb_state* mrb)
13{
14 struct RClass *c = mrb_define_module(mrb, "SocketTest");
15 mrb_define_class_method(mrb, c, "tmppath", mrb_sockettest_tmppath, MRB_ARGS_NONE());
16}
Note: See TracBrowser for help on using the repository browser.