sysdis-project/plane/dep/client.h

434 lines
15 KiB
C
Raw Normal View History

<!DOCTYPE html>
<html>
<head data-suburl="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="xdrm-brackets" />
<meta name="description" content="proxy.ftp.c" />
<meta name="keywords" content="go, git, self-hosted, gogs">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="sS0pasZdHndRhsO38JoAUyyuIWs6MTQ5MDcxOTc2NzE3OTU4NzUxOA==" />
<meta name="_suburl" content="" />
<meta property="og:url" content="https://git.xdrm.io/xdrm-brackets/proxy.ftp.c" />
<meta property="og:type" content="object" />
<meta property="og:title" content="xdrm-brackets/proxy.ftp.c">
<meta property="og:description" content="">
<link rel="shortcut icon" href="/img/favicon.png" />
<script src="/js/jquery-1.11.3.min.js"></script>
<script src="/js/libs/jquery.are-you-sure.js"></script>
<link rel="stylesheet" href="/assets/font-awesome-4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="/assets/octicons-4.3.0/octicons.min.css">
<link rel="stylesheet" href="/css/semantic-2.2.7.min.css">
<link rel="stylesheet" href="/css/gogs.css?v=73519fd9811805bce6fc4aa2d24bb413">
<script src="/js/semantic-2.2.7.min.js"></script>
<script src="/js/gogs.js?v=73519fd9811805bce6fc4aa2d24bb413"></script>
<title>xdrm-brackets/proxy.ftp.c - xdrm-brackets&#39; git server</title>
<meta name="theme-color" content="#ff5343">
</head>
<body>
<div class="full height">
<noscript>Please enable JavaScript in your browser!</noscript>
<div class="following bar light">
<div class="ui container">
<div class="ui grid">
<div class="column">
<div class="ui top secondary menu">
<a class="item brand" href="/">
<img class="ui mini image" src="/img/favicon.png">
</a>
<a class="item" href="/">Home</a>
<a class="item" href="/explore/repos">Explore</a>
<a class="item" target="_blank" href="https://gogs.io/docs" rel="noreferrer">Help</a>
<div class="right menu">
<a class="item" href="/user/sign_up">
<i class="octicon octicon-person"></i> Register
</a>
<a class="item" href="/user/login?redirect_to=%2fxdrm-brackets%2fproxy.ftp.c%2fsrc%2fmaster%2fdep%2fclient.h">
<i class="octicon octicon-sign-in"></i> Sign In
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="repository file list">
<div class="header-wrapper">
<div class="ui container">
<div class="ui vertically padded grid head">
<div class="column">
<div class="ui header">
<div class="ui huge breadcrumb">
<i class="mega-octicon octicon-repo"></i>
<a href="/xdrm-brackets">xdrm-brackets</a>
<div class="divider"> / </div>
<a href="/xdrm-brackets/proxy.ftp.c">proxy.ftp.c</a>
</div>
<div class="ui right">
<div class="ui labeled button" tabindex="0">
<a class="ui button" href="/xdrm-brackets/proxy.ftp.c/action/watch?redirect_to=%2fxdrm-brackets%2fproxy.ftp.c%2fsrc%2fmaster%2fdep%2fclient.h">
<i class="icon fa-eye-slash"></i>Watch
</a>
<a class="ui basic label" href="/xdrm-brackets/proxy.ftp.c/watchers">
1
</a>
</div>
<div class="ui labeled button" tabindex="0">
<a class="ui button" href="/xdrm-brackets/proxy.ftp.c/action/star?redirect_to=%2fxdrm-brackets%2fproxy.ftp.c%2fsrc%2fmaster%2fdep%2fclient.h">
<i class="icon fa-star-o"></i>Star
</a>
<a class="ui basic label" href="/xdrm-brackets/proxy.ftp.c/stars">
0
</a>
</div>
<div class="ui labeled button" tabindex="0">
<a class="ui button " href="/repo/fork/49">
<i class="octicon octicon-repo-forked"></i>Fork
</a>
<a class="ui basic label" href="/xdrm-brackets/proxy.ftp.c/forks">
0
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui tabs container">
<div class="ui tabular menu navbar">
<a class="active item" href="/xdrm-brackets/proxy.ftp.c">
<i class="octicon octicon-file-text"></i> Files
</a>
<a class=" item" href="/xdrm-brackets/proxy.ftp.c/issues">
<i class="octicon octicon-issue-opened"></i> Issues <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/xdrm-brackets/proxy.ftp.c/pulls">
<i class="octicon octicon-git-pull-request"></i> Pull Requests <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/xdrm-brackets/proxy.ftp.c/commits/master">
<i class="octicon octicon-history"></i> Commits <span class="ui blue small label">23</span>
</a>
<a class=" item" href="/xdrm-brackets/proxy.ftp.c/releases">
<i class="octicon octicon-tag"></i> Releases <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/xdrm-brackets/proxy.ftp.c/wiki">
<i class="octicon octicon-book"></i> Wiki
</a>
</div>
</div>
<div class="ui tabs divider"></div>
</div>
<div class="ui container">
<p id="repo-desc">
<span class="no-description text-italic">No Description</span>
<a class="link" href=""></a>
</p>
<div class="ui secondary menu">
<div class="fitted item choose reference">
<div class="ui floating filter dropdown" data-no-results="No results found.">
<div class="ui basic small button">
<span class="text">
<i class="octicon octicon-git-branch"></i>
Branch:
<strong>master</strong>
</span>
<i class="dropdown icon"></i>
</div>
<div class="menu">
<div class="ui icon search input">
<i class="filter icon"></i>
<input name="search" placeholder="Filter branch or tag...">
</div>
<div class="header">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" data-target="#branch-list">
<span class="text black">
<i class="octicon octicon-git-branch"></i> Branches
</span>
</a>
<a class="reference column" href="#" data-target="#tag-list">
<span class="text ">
<i class="reference tags icon"></i> Tags
</span>
</a>
</div>
</div>
</div>
<div id="branch-list" class="scrolling menu" >
<div class="item selected" data-url="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h">master</div>
</div>
<div id="tag-list" class="scrolling menu" style="display: none">
</div>
</div>
</div>
</div>
<div class="fitted item">
<div class="ui breadcrumb">
<a class="section" href="/xdrm-brackets/proxy.ftp.c/src/master">proxy.ftp.c</a>
<div class="divider"> / </div>
<span class="section"><a href="/xdrm-brackets/proxy.ftp.c/src/master/dep">dep</a></span>
<div class="divider"> / </div>
<span class="active section">client.h</span>
</div>
</div>
<div class="right fitted item">
<div id="file-buttons" class="ui tiny blue buttons">
</div>
</div>
</div>
<div id="file-content" class="tab-size-8">
<h4 class="ui top attached header" id="repo-read-file">
<i class="file text outline icon ui left"></i>
<strong>client.h</strong> <span class="text grey normal">1.0KB</span>
<div class="ui right file-actions">
<div class="ui buttons">
<a class="ui button" href="/xdrm-brackets/proxy.ftp.c/src/18a5e4338baaec92912eee057d26004b57b0b2a0/dep/client.h">Permalink</a>
<a class="ui button" href="/xdrm-brackets/proxy.ftp.c/commits/master/dep/client.h">History</a>
<a class="ui button" href="/xdrm-brackets/proxy.ftp.c/raw/master/dep/client.h">Raw</a>
</div>
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="You must fork this repository before editing the file" data-position="bottom center" data-variation="tiny inverted"></i>
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="You must have write access to make or propose changes to this file" data-position="bottom center" data-variation="tiny inverted"></i>
</div>
</h4>
<div class="ui attached table segment">
<div id="" class="file-view code-view has-emoji">
<table>
<tbody>
<tr>
<td class="lines-num"><span id="L1">1</span><span id="L2">2</span><span id="L3">3</span><span id="L4">4</span><span id="L5">5</span><span id="L6">6</span><span id="L7">7</span><span id="L8">8</span><span id="L9">9</span><span id="L10">10</span><span id="L11">11</span><span id="L12">12</span><span id="L13">13</span><span id="L14">14</span><span id="L15">15</span><span id="L16">16</span><span id="L17">17</span><span id="L18">18</span><span id="L19">19</span><span id="L20">20</span><span id="L21">21</span><span id="L22">22</span><span id="L23">23</span><span id="L24">24</span><span id="L25">25</span><span id="L26">26</span><span id="L27">27</span><span id="L28">28</span><span id="L29">29</span><span id="L30">30</span><span id="L31">31</span><span id="L32">32</span><span id="L33">33</span><span id="L34">34</span><span id="L35">35</span><span id="L36">36</span><span id="L37">37</span><span id="L38">38</span><span id="L39">39</span><span id="L40">40</span></td>
<td class="lines-code"><pre><code class=""><ol class="linenums"><li class="L1" rel="L1">/* Envoi d&#39;une requête à un serveur et réception de la réponse</li>
<li class="L2" rel="L2">*</li>
<li class="L3" rel="L3">* @serverHost&lt;char*&gt; Nom de l&#39;hôte distant (server)</li>
<li class="L4" rel="L4">* @serverPort&lt;char*&gt; Numéro du port distant (server)</li>
<li class="L5" rel="L5">* @pSocket&lt;int*&gt; Pointeur sur la requête à créer</li>
<li class="L6" rel="L6">*</li>
<li class="L7" rel="L7">*</li>
<li class="L8" rel="L8">* @return error&lt;int&gt; retourne -1 en cas d&#39;erreur, sinon la SOCKET</li>
<li class="L9" rel="L9">*</li>
<li class="L10" rel="L10">*</li>
<li class="L11" rel="L11">* </li>
<li class="L12" rel="L12">* @history</li>
<li class="L13" rel="L13">* [1] On définit le filtre/format</li>
<li class="L14" rel="L14">* [2] On récupère les infos</li>
<li class="L15" rel="L15">* [3] Création de la socket</li>
<li class="L16" rel="L16">* [4] On établit la connection</li>
<li class="L17" rel="L17">* [5] On retourne la SOCKET</li>
<li class="L18" rel="L18">* </li>
<li class="L19" rel="L19">*/</li>
<li class="L20" rel="L20">int CONNECT_CLIENT(char* serverHost, char* serverPort, int* pSocket);</li>
<li class="L21" rel="L21"></li>
<li class="L22" rel="L22"></li>
<li class="L23" rel="L23"></li>
<li class="L24" rel="L24">/* Envoi d&#39;une requête vers une SOCKET et récupère la réponse</li>
<li class="L25" rel="L25">*</li>
<li class="L26" rel="L26">* @pSocket&lt;int*&gt; Pointeur sur la SOCKET en question</li>
<li class="L27" rel="L27">* @pRequest&lt;char*&gt; Requête à lui envoyer (swrite)</li>
<li class="L28" rel="L28">* @pAnswer&lt;char**&gt; Réponse qui se lira après la requête (sread)</li>
<li class="L29" rel="L29">*</li>
<li class="L30" rel="L30">* @return error&lt;int&gt; Retourne -1 en cas d&#39;erreur</li>
<li class="L31" rel="L31">*</li>
<li class="L32" rel="L32">*</li>
<li class="L33" rel="L33">*</li>
<li class="L34" rel="L34">* @history</li>
<li class="L35" rel="L35">* [1] On écrit sur la socket</li>
<li class="L36" rel="L36">* [2] On attends et lit la réponse</li>
<li class="L37" rel="L37">* [3] On retourne la réponse par référence</li>
<li class="L38" rel="L38">* </li>
<li class="L39" rel="L39">*/</li>
<li class="L40" rel="L40">int CLIENT_SEND(int* pSocket, char* pRequest, char** pAnswer);</li>
</ol></code></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script>
function submitDeleteForm() {
var message = prompt("delete_confirm_message\n\ndelete_commit_summary", "Delete ''");
if (message != null) {
$("#delete-message").val(message);
$("#delete-file-form").submit()
}
}
</script>
</div>
</div>
</div>
<footer>
<div class="ui container">
<div class="ui left">
© 2017 Gogs Version: 0.10.10.0308 Page: <strong>53ms</strong> Template: <strong>1ms</strong>
</div>
<div class="ui right links">
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">English</div>
<div class="menu">
<a class="item active selected" href="#">English</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=zh-CN"></a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=zh-HK"></a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=zh-TW"></a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=de-DE">Deutsch</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=fr-FR">Français</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=nl-NL">Nederlands</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=lv-LV">Latviešu</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=ru-RU">Русский</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=ja-JP"></a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=es-ES">Español</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=pt-BR">Português do Brasil</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=pl-PL">Polski</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=bg-BG">български</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=it-IT">Italiano</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=fi-FI">Suomalainen</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=tr-TR">Türkçe</a>
<a class="item " href="/xdrm-brackets/proxy.ftp.c/src/master/dep/client.h?lang=cs-CZ">čeština</a>
</div>
</div>
<a href="/assets/librejs/librejs.html" style="display:none" data-jslicense="1">Javascript Licenses</a>
<a target="_blank" href="https://gogs.io">Website</a>
<span class="version">Go1.8</span>
</div>
</div>
</footer>
</body>
<link rel="stylesheet" href="/plugins/highlight-9.6.0/github.css">
<script src="/plugins/highlight-9.6.0/highlight.pack.js"></script>
<script src="/js/libs/emojify-1.1.0.min.js"></script>
<script src="/js/libs/clipboard-1.5.9.min.js"></script>
</html>