"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[2534],{2818:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"XXTLanControl.lua/core/set_api_url","title":"\u8bbe\u7f6e\u4e2d\u63a7\u8bbf\u95ee\u5730\u5740 (LCC.set_api_url)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/core/set_api_url.md","sourceDirName":"XXTLanControl.lua/core","slug":"/XXTLanControl.lua/core/set_api_url","permalink":"/docs/XXTLanControl.lua/core/set_api_url","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"\u6838\u5fc3","permalink":"/docs/XXTLanControl.lua/core/"},"next":{"title":"\u8bbe\u7f6e\u8bf7\u6c42\u91cd\u8bd5\u6b21\u6570 (LCC.set_retry_count)","permalink":"/docs/XXTLanControl.lua/core/set_retry_count"}}');var l=r(4848),s=r(8453);const o={sidebar_position:10},i="\u8bbe\u7f6e\u4e2d\u63a7\u8bbf\u95ee\u5730\u5740 (LCC.set_api_url)",c={},a=[{value:"\u58f0\u660e",id:"\u58f0\u660e",level:2},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:2},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:2},{value:"\u8bf4\u660e",id:"\u8bf4\u660e",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2}];function d(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"\u8bbe\u7f6e\u4e2d\u63a7\u8bbf\u95ee\u5730\u5740-lccset_api_url",children:"\u8bbe\u7f6e\u4e2d\u63a7\u8bbf\u95ee\u5730\u5740 (LCC.set_api_url)"})}),"\n",(0,l.jsx)(n.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-lua",children:"LCC.set_api_url(url)\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["url",(0,l.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u4e2d\u63a7\u670d\u52a1\u5668\u7684 HTTP \u57fa\u7840\u5730\u5740\uff08\u4f8b\u5982 ",(0,l.jsx)(n.code,{children:"http://192.168.1.100:46990"}),"\uff09"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u65e0"}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,l.jsxs)(n.blockquote,{children:["\n",(0,l.jsxs)(n.p,{children:["\u5c06\u4e2d\u63a7\u8bbf\u95ee\u5730\u5740\u5199\u5165\u914d\u7f6e\uff0c\u540e\u7eed\u6240\u6709\u63a5\u53e3\u90fd\u4f1a\u590d\u7528\u8fd9\u4e2a\u5730\u5740\u3002",(0,l.jsx)(n.br,{}),"\n","\u5982\u679c\u811a\u672c\u4e0d\u662f\u7531\u4e2d\u63a7\u542f\u52a8\u7684\uff0c\u5fc5\u987b\u5728\u8c03\u7528 ",(0,l.jsx)(n.code,{children:"LCC.connect()"})," \u4e4b\u524d\u5148\u8bbe\u7f6e\u5730\u5740\u3002",(0,l.jsx)(n.br,{}),"\n","\u8c03\u7528\u540e\u4f1a\u8986\u76d6\u5148\u524d\u4fdd\u5b58\u7684\u5730\u5740\uff0c\u5e76\u540c\u6b65\u5237\u65b0\u5185\u5b58\u4e2d\u7684\u6a21\u5757\u914d\u7f6e\u3002"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-lua",children:'LCC.set_api_url("http://192.168.1.100:46990")\nif not LCC.connect() then\n    error("\u65e0\u6cd5\u8fde\u63a5\u4e2d\u63a7")\nend\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(6540);const l={},s=t.createContext(l);function o(e){const n=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);