Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5996811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:10:36+00:00 2026-05-23T00:10:36+00:00

When I use local socket = require(socket.core) It works fine, the dll is located

  • 0

When I use

local socket = require("socket.core")

It works fine, the dll is located at “dir/socket/core.dll” but when I move the dll to say

“dir/folder/core.dll” and use

local socket = require("folder.core.")

It returns that it was found however it could not find the specific module in folder.core.

How do I use Luasocket outside of it’s socket.core requirements?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:10:36+00:00Added an answer on May 23, 2026 at 12:10 am

    If you want to require("socket.core"), the shared library (dll) has to have an exported function called luaopen_socket_core (which the LuaSocket library has). Thus, it always needs to be called as require("socket.core").

    If you want to move the DLL into some other folder, you have to modify package.cpath, which contains the file patterns which will be checked.

    Let’s say that you want to move the LuaSocket binary to folder. You have to place the binary in folder/socket/core.dll and modify package.cpath prior to calling require:

    package.cpath = package.cpath .. ';folder/?.dll'
    local socket = require('socket.core')
    

    ? represents the name passed to require translated to file paths: . -> /, i.e. socket.core -> socket/core.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use this c socket class , but it only works
I have a socket application which I can use in local network, at home.
I require socket-like local IPC. I used named pipes and overlapped IO on windows
I want to make a small program which use local namespace socket and I
I'm a newbie in UNIX programming. Normally, when we use local socket to communicate,
I've got this bit of code here: local http = require(socket.http) I know it's
I use Socket to connect to my local server: public static Socket clientSocket; public
I have started a new mvc project and clicked on project\properties\web - use local
I'm trying to debug an ASP.NET webapp that's configured to Use Local IIS Web
I currently use my local web server to allow costumers to preview some applications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.